cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@d-haven.org>
Subject Re: Restating the Exception Problem (was Re: [VOTE] Make ProcessingException extend CascadingRuntimeException)
Date Fri, 16 Apr 2004 16:24:56 GMT
Ugo Cei wrote:

>> a more serious issue.  You cannot go by the type of exception alone.  
>> By allowing the ProcessingException to have this additional 
>> information embedded, the Sitemap can better handle creating more 
>> accurate error pages.
> 
> 
> I'm confused here. Doesn't it already have it embedded?

only by exception heirarchy.  For instance, the 
ResourceNotFoundException is a Processing exception, which provides the 
hint that it is a 404 error.

Now it would be just as easy to allow the embedding of an error code so 
that we can handle any arbitrary issue.  Another example is the 403 
authorization error.  I don't think we have a specific exception for that.

According to what I see:

http://cvs.apache.org/viewcvs.cgi/cocoon-2.2/src/java/org/apache/cocoon/ProcessingException.java?view=markup

There is no get/set error code for the exception.  Adding one is 
backwards compatible, and then using the error code is something that 
can be done in the sitemap.

Our exception inheritance structure would allow automatic setting of the 
appropriate error code for that exception type so you don't loose the 
convenience, but you can still handle error codes that aren't 
specifically handled right now.


Mime
View raw message