Rafal Krzewski <[EMAIL PROTECTED]> writes:

> Java Apache CVS Development wrote:
> > 
> >   User: dlr
> >   Date: 01/02/04 19:03:34
> > 
> >   Modified:    src/java/org/apache/turbine/util/db/pool DBConnection.java
> >   Log:
> >   Slightly more efficient error handling.  Corrected tiny documentation
> >   deviation which slipped in unnoticed during last commit.
> <snip>
> >            catch (Exception e)
> >            {
> >   -            Log.warn("Couldn't close database connection" + e.toString());
> >   -            throw new SQLException ("Couldn't close database connection: " +
> >   -                e.toString());
> >   +            String errMsg = "Couldn't close database connection: " + e;
> >   +            Log.warn(errMsg);
> >   +            throw new SQLException(errMsg);
> >            }
> 
> Maybe you could use TurbineException (or a custm derivate of it) ?

That would've been great.  However, the PooledConnection interface
needs to throw a SQLException.  SQLException and TurbineException are
both solid classes, so there is no way to extend both.  I think we
need to do something like you suggest, however.  Perhaps we need an
interface similar to what TurbineException presents.  This isn't the
only place where we rethrow exceptions--and lose the stack trace in the
process--because we need to throw a specific type of exception.
-- 

Daniel Rall <[EMAIL PROTECTED]>


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to