From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
Sent: Tuesday, July 23, 2002 10:38 AM
Subject: Re: Is there any way to stop exceptions getting logged to log file?


> On Tue, 23 Jul 2002, Mark O'Driscoll wrote:
>
> > I am using a filter to trap exceptions thrown by jsps/servlets. In
normal
> > program operation, lots of these exceptions get thrown.
>
> To avoid the exceptions getting logged, you'll need to catch them in the
> servlet or JSP itself (which is a much better programming practice than
> letting them flow through), so that the servlet container never sees them.
> Exceptions from servlets and JSPs should not be considered "normal" --
> they are an indication of an error condition that the application should
> have taken care of, but did not.

I'll second what Craig has said and add that if your program "normally"
throws lots of exceptions, then you should look at some of your design
decisions. Exceptions are wonderful when used for "Exceptional" behavior,
but not for "normal" runs. They are also REALLY slow. Exceptions can kill
your performance, and if you are getting them regularly, you should catch
the ones you can "safely" ignore as early as possible and toss them away as
appropriate, or even better, not throw them at all.

Regards,

Will Hartung
([EMAIL PROTECTED])




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to