james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Burrell Donkin" <robertburrelldon...@gmail.com>
Subject Re: Error Handling In JDBCMailRepository
Date Thu, 02 Aug 2007 19:56:05 GMT
committed

On 8/2/07, norman <norman@apache.org> wrote:
> Am Mittwoch, den 01.08.2007, 20:32 +0000 schrieb Robert Burrell Donkin:
> > JDBCMailRepository contains several examples of exception handing similar to:
> >
> >         } catch (Exception me) {
> >             throw new MessagingException("Exception while retrieving
> > mail: " + me.getMessage());
> >        }
> >
> > the downside with this approach is that information about the original
> > exception (including the stack trace) are lost. (i'm getting a null
> > pointer thrown but without a stack trace it's hard to know where the
> > problem lies.)
> >
> > any reason why changing these to:
> >
> > } catch (Exception me) {
> >    getLogger().debug("XXX", me);
> >    throw new MessagingException("Exception while retrieving mail: " +
> > me.getMessage(), me);
> > }
> >
> > would be a bad idea?
> >
> > - robert
>
> +1
>
> Norman
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message