cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Error Handler
Date Thu, 01 Jan 1970 00:00:00 GMT
--- Erhalten von  I0.U150033 0512 20 5221                  20.12.99 09.16

We discussed this matter 2 days ago. Here's our proposal:

In one specifies what exception-handler (I like it
better than Error-Handler):
exceptionhandler.default =
exceptionhandler.debug =
org.apache.cocoon.exceptionhandler.DebugExeptionHandler (used for
debugging -> displays stacktrace)
exceptionhandler.html =
exceptionhandler.wml =

-> every ExceptionHandler that implements the ExceptionHandlerInterface
can be plugged in.

In case of an exception it would be propagated up to with then
calls Frontend.error.

Frontend.error has to be rewritten. It calls an ExceptionHandlerFactory
witch return the appropriate ExceptionHandler (-> User-agend &

Then we use the method "handle" of the returned
ExceptionHandler-Reference. The Exception Handler can then return a
message to the user.

If anything goes wrong (ExceptionHandler can't be instanciated ... ) then
we would return Error 500.

What do you think?? (We're actually planning on implementing this stuff
before the end of the year)



Date: Fri, 17 Dec 1999 17:33:43 +0100
Subject: Re: Error Handler

> --- Erhalten von  I0.U150033 0512 20 5221                 17.12.99 08.53
> I think the tree layer aproach is a good one. Althoug I'd like the
> ErrorHandler to handle all Errors. If for some reason the ErrorHandler
> throws an exception then we would send Error 500.

Yes, that's what I had in mind (sorry if it wasn't clear).

> I'd like to handle an error depending on the user-agent. For example
> display an wml-error page.

Totally. It's in the todo list.

I'm currently very busy doing other stuff, would you like to help us to
add this errorHandler thing?

Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<>                             Friedrich Nietzsche

---- 20.12.99 09.16 ---- Gesendet an   -----------------------------------

View raw message