Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 21990 invoked from network); 25 Jun 2004 13:13:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 25 Jun 2004 13:13:13 -0000 Received: (qmail 372 invoked by uid 500); 25 Jun 2004 13:13:04 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 296 invoked by uid 500); 25 Jun 2004 13:13:02 -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 131 invoked by uid 99); 25 Jun 2004 13:12:59 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received: from [81.56.241.65] (HELO mail.anyware-tech.com) (81.56.241.65) by apache.org (qpsmtpd/0.27.1) with ESMTP; Fri, 25 Jun 2004 06:12:59 -0700 Received: from apache.org (firewall.anyware [10.1.0.254]) by mail.anyware-tech.com (Postfix) with ESMTP id DA2E85EB48 for ; Fri, 25 Jun 2004 15:12:51 +0200 (CEST) Message-ID: <40DC24D2.2040904@apache.org> Date: Fri, 25 Jun 2004 15:12:50 +0200 From: Sylvain Wallez User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040113 X-Accept-Language: fr, en, en-us MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Throwing errors in component's initialize() method References: <5E091A68F794974CAF431CA31F5AF2CC1893BE@server.bizzdesign.nl> In-Reply-To: <5E091A68F794974CAF431CA31F5AF2CC1893BE@server.bizzdesign.nl> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Bart Molenkamp wrote: >Ok, thanks, > >But could you tell me why it catches only exceptions, and not errors? >(Just interested). > > Because, quoting the Javadoc, "An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch." This has been discussed several times (dig the archives for "Throwable"), and IIRC the conclusion was that the only error that would make sense for Cocoon to catch is OutOfMemoryError. Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }