cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Royal <pro...@managingpartners.com>
Subject Re: When to log exceptions
Date Wed, 19 Dec 2001 16:34:03 GMT
On Wednesday 19 December 2001 11:04 am, you wrote:
> c) make the exceptions implement the Notificable and CascadingException
> interface and make the final catcher (CocoonServlet) log them before
> sending them to the handle-errors pipline (the patch is almost ready,
> please stand by ...).
> The problem with logging exceptions is that in many parts of the code,
> for at least some time, there were Exceptions logged and not properly
> rethrown... "see the logs" is not acceptable on normal errors, they
> must be handled and reported correctly in handle-errors.
> So I propose to never log exceptions directly (CocoonServlet does) and
> use logging only for extra reporting.

Actually they would be caught in the generated sitemap, because that is where 
the handle-errors pipeline is processed. And the sitemap does already log all 
exceptions before passing them onto handle-errors.

But I would propose a slightly different variant on the choices:

The sitemap is the final catcher and logger of all exceptions. If an 
exception happens during the processing of a request it must be either 
repackaged inside of another exception (such as some of the SocketException's 
into ConnectionResetException), or re-thrown. It should only be logged in the 
sitemap.

-pete

-- 
peter royal -> proyal@managingpartners.com

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message