cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@us.ibm.com
Subject error generator (was re: C2 status)
Date Mon, 31 Jul 2000 01:17:35 GMT


My understanding of the sitemap proposal is that it allows the definition
of at most one series of processors to handle errors per pipeline.  I'd
like to suggest that this definition be expanded to allow multiple error
processors to be defined, and that an additional attribute be defined on
the map:handle-errors element to indicate what exception this series of
processors is designed to handle.

The reason for this request is that I would like to define an error handler
specific for PHP - it may do things such as display an excerpt of lines
from the original file, with the line on which the error occurred
highlighted somehow.  Other information such as the line number, column
number, and error text would also be present.  This information would
obviously be specific to the type of error being handled.

The code generated by the sitemap compiler could be as simple as a series
of

   if (exception instanceof exception1) {
     execute map 1
   } else if (exception instanceof exception2) {
     execute map 2
   } ...

The default could be that an error handler handles java.lang.Exception (or
java.lang.Throwable).

- Sam Ruby



Mime
View raw message