Re: Quick question before submitting a feature request...
| From: | Daniel Brown | Date: | Fri, 23 Nov 2007 17:49:42 +0000 |
| Subject: | Re: Quick question before submitting a feature request... | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-33400@lists.php.net to get a copy of this message | ||
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 <dohpaz@gmail.com> 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 <evert@rooftopsolutions.nl> 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.