Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4394 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6723 invoked by uid 1010); 5 Sep 2003 15:24:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 6678 invoked from network); 5 Sep 2003 15:24:31 -0000 Received: from unknown (HELO mailout08.sul.t-online.com) (194.25.134.20) by pb1.pair.com with SMTP; 5 Sep 2003 15:24:31 -0000 Received: from fwd02.aul.t-online.de by mailout08.sul.t-online.com with smtp id 19vIRo-0000tI-01; Fri, 05 Sep 2003 17:24:28 +0200 Received: from 80.142.167.195 (r29ybBZDYeGvAHOZ8zMOmLEJRLb1M9At7XBojp8rlm-HcUfSfQJ46y@[80.142.167.195]) by fwd02.sul.t-online.com with esmtp id 19vIRk-1EIFIu0; Fri, 5 Sep 2003 17:24:24 +0200 Date: Fri, 5 Sep 2003 17:24:21 +0200 X-Mailer: The Bat! (v2.00) Educational Reply-To: =?ISO-8859-15?B?TWFyY3VzIEL2cmdlcg==?= X-Priority: 3 (Normal) Message-ID: <1571295530546.20030905172421@post.rwth-aachen.de> To: Andi Gutmans , Zeev Suraski CC: internals@lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 8bit X-Seen: false X-ID: r29ybBZDYeGvAHOZ8zMOmLEJRLb1M9At7XBojp8rlm-HcUfSfQJ46y Subject: Default exception handler From: marcus.boerger@t-online.de ((=?ISO-8859-15?B?TWFyY3VzIEL2cmdlcg==?=)) Hello internals, hi Zeev, hi Andi, Currently php doesn't have a default exception handler that gets executed if the thrown excpetion was not caught by any previous handler. I now suggest the following extension: try { // code } catch (class1 $var) { } catch (class2 $var) { } catch ($var) { } Thereby it should only be possible to have an exception handler that does not specify a class as the last one. Since we only allow throwing objects at the moment we know that the caught variable is any object and hence we do not need a syntax like catch (...) provided by C++ for example. An alternative concept would be to allow throwing exception instances only. But inside the C code you could still throw other objects. A patch to enable the new syntax can be found here: http://marcus-boerger.de/php/ext/ze2/ze2-catch-20030905.diff.txt Best regards, Marcus mailto:marcus.boerger@post.rwth-aachen.de