Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33400 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39167 invoked by uid 1010); 23 Nov 2007 17:49:54 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 39152 invoked from network); 23 Nov 2007 17:49:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Nov 2007 17:49:54 -0000 Authentication-Results: pb1.pair.com header.from=parasane@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=parasane@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.198.189 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: parasane@gmail.com X-Host-Fingerprint: 209.85.198.189 rv-out-0910.google.com Received: from [209.85.198.189] ([209.85.198.189:7445] helo=rv-out-0910.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 55/A4-02479-0C217474 for ; Fri, 23 Nov 2007 12:49:52 -0500 Received: by rv-out-0910.google.com with SMTP id k15so2750636rvb for ; Fri, 23 Nov 2007 09:49:42 -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:content-transfer-encoding:content-disposition:references; bh=2GloUJ23FLBNMts+jJWLWj1OWG9x1FXJcf8+5vfdQ5I=; b=dgEbUYVEdIDMIjDsJVJBIrYO6IFiDt5/9DuuEhvZCgDF2tyLoEfBwJeM+ZjGQISVQqLFtr5J4VGPsK1yp8/IdsdciXc8BLT7/c3WSouQb2Lfo3a9OK1ZXuV1Fo0hCNR3u7JUMlCjqVQCS5Qct19wvn51xg9jAsmnMLJxDY4QUe8= 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:content-transfer-encoding:content-disposition:references; b=am+ldEHICjmWD6K8Hq4S+kvudyyBa3xMpCIKuHWuuFCNPArFTVkPRoSngiBRJz/q61hPNIqZGQ0Vfz5ER4RKUdS+dNSL5xxeW2B14/irq78J4vAYueWs5/0+glEICxw4XLfu3ONw0pAvX7PVlA/EWx844XaG4mvePvzFmXAM05k= Received: by 10.140.251.1 with SMTP id y1mr4619109rvh.1195840182155; Fri, 23 Nov 2007 09:49:42 -0800 (PST) Received: by 10.141.52.8 with HTTP; Fri, 23 Nov 2007 09:49:42 -0800 (PST) Message-ID: Date: Fri, 23 Nov 2007 12:49:42 -0500 To: "Ken Stanley" Cc: "Evert | Rooftop" , internals@lists.php.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <474511C7.4030501@rooftopsolutions.nl> Subject: Re: [PHP-DEV] Quick question before submitting a feature request... From: parasane@gmail.com ("Daniel Brown") Ken, This same issue was referred to back in 2004 on the php.net site. I just looked it up and the post can be found by ptah@se.linux.org from 9 September, 2004, on this page: http://us.php.net/errorfunc On Nov 23, 2007 12:32 AM, Ken Stanley wrote: > 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" > -- Daniel P. Brown [office] (570-) 587-7080 Ext. 272 [mobile] (570-) 766-8107 If at first you don't succeed, stick to what you know best so that you can make enough money to pay someone else to do it for you.