Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33376 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67223 invoked by uid 1010); 22 Nov 2007 07:39:02 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 67208 invoked from network); 22 Nov 2007 07:39:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 22 Nov 2007 07:39:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=indeyets@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=indeyets@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 64.233.184.229 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: indeyets@gmail.com X-Host-Fingerprint: 64.233.184.229 wr-out-0506.google.com Linux 2.4/2.6 Received: from [64.233.184.229] ([64.233.184.229:2141] helo=wr-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/D7-02094-41235474 for ; Thu, 22 Nov 2007 02:39:00 -0500 Received: by wr-out-0506.google.com with SMTP id 55so1807175wri for ; Wed, 21 Nov 2007 23:38:58 -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=MZKRTWhik5YINqHukiSDlj2PGRQoR/Ek2KkDqK1Py+I=; b=hjtDnIn33esgGFWvgEm5mcxYuPbgN9zLGQm9ehDgk2gh3+mbR6Y+8ZEdqtOY6CRbIkiuSU5fyOpQOr87xAaCqy2NJg40Dtie6dmS/iJjG+wpTwE9R6rEwyBy/fhpxvcYcOfug4ozKTlIBDempOIzTu5nl9Zg6Yp72MrgnwhUvlM= 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=RBp+Igysoaxq0P0ngch2xiBBmJM3mvZjMUaDu6lfPTyoEyC6pqQUwrb2QOMehOAJ/TVEKj/NLmW8CtYdkhUwKzX64MX+iRXKXTqQlMiWzmLQAB8jGePsp+LijCIzyp1K6RsCPk9ZE4yYm3Or0LXDwRpWHT+9hbMIpf9xD5H9cWU= Received: by 10.150.58.5 with SMTP id g5mr1542855yba.1195717138180; Wed, 21 Nov 2007 23:38:58 -0800 (PST) Received: by 10.150.52.9 with HTTP; Wed, 21 Nov 2007 23:38:58 -0800 (PST) Message-ID: Date: Thu, 22 Nov 2007 10:38:58 +0300 To: "Ken Stanley" Cc: internals@lists.php.net In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Subject: Re: [PHP-DEV] Quick question before submitting a feature request... From: indeyets@gmail.com ("Alexey Zakhlestin") Well, just as there is set_exception_handler, there is set_error_handler function which probably does what you want. Another thing: what stops you from explicitly catching the exception using try/catch blocks? I believe that would solve most of your problems. set_exception_handler is really a "last hope" situation On 11/22/07, Ken Stanley wrote: > Hello, > > I have done my best to look through both the internals archive and the bug > database, however I feel that I may have missed something; hence this > e-mail. I am working on a project that uses set_exception_handler() so that > I can attempt to display a uniform error page, perform logging, etc, of > exceptions. Due to prior lack of expertise on my part, I fool-heartedly > wrote a view class that would throw an exception if a view was not found. > The problem that I run into, that I feel could be improved, is that if the > view class throws the exception during exception handling, I get the error, > "Fatal error: Exception thrown without a stack frame in Unknown on line 0." > > Now, I completely understand and agree with why this is happening. I have > corrected my mistake so that it will use trigger_error() instead of throwing > an exception. However, in my Google searches I have noticed that there are a > lot of people having somewhat similar problems, but without an easy > solution. My feature request would be to include the filename and possibly > even the line number where this last exception was thrown from. Since I am > not using the bleeding edge version of PHP (I use 5.2.1), and I am not > fluent in reading C, I was hoping someone here could let me know if this has > already been fixed in a newer version of PHP, and if not, if it would be > worth creating a feature request for this little bit of extra information. > Is it even possible? I make the assumption that since the error states that > it has no stack, then that would mean there is no information at all. Is > that correct? > > Thank you for your time, and thank you for PHP. > > P.S. I did find bug #31304, which it seems the submitter was poorly > attempting to request this same thing. I admit that I do not use the bug > tracker tool very much, so I am unsure if I should re-open this bug and just > append my request to it, or create a new one that is worded more clearly. > Please advise. > > -- > 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" > -- Alexey Zakhlestin http://blog.milkfarmsoft.com/