cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CHRISTOPH.OEH...@SBB.CH
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 cocoon.properties one specifies what exception-handler (I like it
better than Error-Handler):
exceptionhandler.default =
org.apache.cocoon.exceptionhandler.HtmlExeptionHandler
exceptionhandler.debug =
org.apache.cocoon.exceptionhandler.DebugExeptionHandler (used for
debugging -> displays stacktrace)
exceptionhandler.html =
org.apache.cocoon.exceptionhandler.HtmlExeptionHandler
exceptionhandler.wml =
org.apache.cocoon.exceptionhandler.WmlExeptionHandler

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


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

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

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)

Christoph

--------------------------------------------------------------------------

From: stefano@apache.org
To: cocoon-dev@xml.apache.org
Date: Fri, 17 Dec 1999 17:33:43 +0100
Subject: Re: Error Handler

CHRISTOPH.OEHLER@SBB.CH wrote:
>
> --- 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.
<stefano@apache.org>                             Friedrich Nietzsche

---- 20.12.99 09.16 ---- Gesendet an   -----------------------------------
  -> cocoon-dev@xml.apache.org

Mime
View raw message