Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33380 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 66064 invoked by uid 1010); 23 Nov 2007 05:32:26 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 66048 invoked from network); 23 Nov 2007 05:32:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Nov 2007 05:32:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=dohpaz@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dohpaz@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.162.233 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: dohpaz@gmail.com X-Host-Fingerprint: 64.233.162.233 nz-out-0506.google.com Received: from [64.233.162.233] ([64.233.162.233:38124] helo=nz-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EC/31-52046-9E566474 for ; Fri, 23 Nov 2007 00:32:26 -0500 Received: by nz-out-0506.google.com with SMTP id x7so2331725nzc for ; Thu, 22 Nov 2007 21:32:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=WkLbo3GGfwfCv2sA0WgmuTTjD7fNRpFK+FuU9xu9EgA=; b=iADgytS2o8UAWBlHoeBQlh23Qn6OW65/I8iYVul1ZvPN1vRFvCLoSVvaRmY11RlP5PCdlWc12Jyolp12AK+0ttPQV+cFwjCnLo3S7tKA+01dAKSFSVLYMcTeG4PkskoMHadMJP7Ry7/cMQBAFwxJvn4kly1gsoFee/GXssZcLi8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=dSnaI9co6+8bPVCW+vjoj0m1O3IZyM0pRFk5omh9wBdJhJ38JQeaHudBExeX+p4MStmDgbK9WCx42LWwtMgcG/7n/1zuZamItF6yMbsgSC5xm9bKrkov+LqTh8Jh1J3BpR7jn79tO8C/zJh/U35PUbwCjJhh7AWFtHuFv6l6hMk= Received: by 10.142.90.8 with SMTP id n8mr2528911wfb.1195795942781; Thu, 22 Nov 2007 21:32:22 -0800 (PST) Received: by 10.142.214.8 with HTTP; Thu, 22 Nov 2007 21:32:22 -0800 (PST) Message-ID: Date: Fri, 23 Nov 2007 00:32:22 -0500 To: "Evert | Rooftop" Cc: internals@lists.php.net In-Reply-To: <474511C7.4030501@rooftopsolutions.nl> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1726_24238009.1195795942766" References: <474511C7.4030501@rooftopsolutions.nl> Subject: Re: [PHP-DEV] Quick question before submitting a feature request... From: dohpaz@gmail.com ("Ken Stanley") ------=_Part_1726_24238009.1195795942766 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I completely agree with what you and Alexy suggest. I've since refactored my code accordingly so that an exception would not be thrown while inside of an exception. But, that does not answer my original question. I asked about submitting a feature request that would simply provide more information in the unfortunate event that anybody's code inadvertantly throws an exception while in an exception, and whether or not it would be advantageous to do so, or if work was already being done on this very issue. The current error provides no information at all (e.g., no file name or line number of the offending exception), which in some cases makes it nearly impossible to debug. My apologies if I was not clear enough in my first e-mail. :) On Nov 22, 2007 12:21 AM, Evert | Rooftop wrote: > > Perfect code should catch every exception. If your code is at a point > where exceptions can be thrown, you should be using catch to actually > catch the exception and handle the exception appropriately. > > set_exception_handler should in fact only be used to spot a bug in your > code.. A bug being in this case, not catching an expected exception. Its > the last fallback.. If you really need complex code tied to your > exception handler, then use a try..catch block there too.. > > Evert > -- It looked like something resembling white marble, which was probably what it was: something resembling white marble. -- Douglas Adams, "The Hitchhikers Guide to the Galaxy" ------=_Part_1726_24238009.1195795942766--