Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 50887 invoked from network); 16 Apr 2004 16:25:09 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 16 Apr 2004 16:25:09 -0000 Received: (qmail 54930 invoked by uid 500); 16 Apr 2004 16:24:59 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 54765 invoked by uid 500); 16 Apr 2004 16:24:58 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 54746 invoked from network); 16 Apr 2004 16:24:57 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by daedalus.apache.org with SMTP; 16 Apr 2004 16:24:57 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BEW9E-0000cV-00 for ; Fri, 16 Apr 2004 18:25:00 +0200 Received: from 66.208.12.130 ([66.208.12.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 16 Apr 2004 18:25:00 +0200 Received: from bloritsch by 66.208.12.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 16 Apr 2004 18:25:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: dev@cocoon.apache.org From: Berin Loritsch Subject: Re: Restating the Exception Problem (was Re: [VOTE] Make ProcessingException extend CascadingRuntimeException) Date: Fri, 16 Apr 2004 12:24:56 -0400 Lines: 30 Message-ID: References: <407F7DDB.2030905@apache.org> <407F8A17.2090208@cbim.it> <407F995B.3010209@cbim.it> <407FA09F.6070809@outerthought.org> <407FA913.6070803@cbim.it> <407FB8EB.3090303@outerthought.org> <407FD354.7080807@cbim.it> <407FEBF5.6070503@cbim.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 66.208.12.130 User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en In-Reply-To: <407FEBF5.6070503@cbim.it> Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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.