Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:1275 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97012 invoked from network); 5 May 2003 17:06:14 -0000 Received: from unknown (HELO mailout07.sul.t-online.com) (194.25.134.83) by pb1.pair.com with SMTP; 5 May 2003 17:06:14 -0000 Received: from fwd05.sul.t-online.de by mailout07.sul.t-online.com with smtp id 19CjPo-00071p-08; Mon, 05 May 2003 19:06:12 +0200 Received: from baumbart.post.rwth-aachen.de (520072483730-0001@[80.142.166.97]) by fwd05.sul.t-online.com with esmtp id 19CjPf-0ZVVYGC; Mon, 5 May 2003 19:06:03 +0200 Reply-to:marcus.boerger@post.rwth-aachen.de Message-ID: <5.1.0.14.2.20030505190333.09520790@pop.t-online.de> X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Mon, 05 May 2003 19:06:02 +0200 To: Daniel Lorch Cc: Sterling Hughes ,internals@lists.php.net In-Reply-To: <20030505115955.39e6696a.ml-daniel@lorch.cc> References: <1052077704.11371.319.camel@hasele> <5.1.0.14.2.20030504021938.09452980@mailbox.rwth-aachen.de> <1052077704.11371.319.camel@hasele> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Sender: 520072483730-0001@t-dialin.net Subject: Re: [PHP-DEV] exceptions instead of errors From: marcus.boerger@t-online.de ((Marcus =?iso-8859-1?Q?B=F6rger?=)) At 12:59 05.05.2003, Daniel Lorch wrote: >Read more here: > > >http://java.sun.com/docs/books/tutorial/essential/exceptions/definition.html > >Basically try/catch-statements allow you to keep the main code block short >and readable because the error handling code is moved somewhere else. Would >be nice seeing this in PHP. Then basically you did the main error with exceptions. They are exceptions. So the normal error handling should still be done by rceiving error codes or reacting on the return values of functions. However it is possible to move all error handling into a catch block... There is only one thing that cannot be solved other than with excetions and that is error situations in constructors. regards marcus