RE: [PHP] How can I detect an exception without using try/catch?
| From: | Andrea Giammarchi | Date: | Fri, 24 Apr 2009 08:10:42 +0000 |
| Subject: | RE: [PHP] How can I detect an exception without using try/catch? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-291905@lists.php.net to get a copy of this message | ||
http://uk2.php.net/set_exception_handler
http://uk2.php.net/manual/en/function.set-error-handler.php
> Date: Thu, 23 Apr 2009 12:19:30 -0400
> From: wmoran@potentialtech.com
> To: php-general@lists.php.net
> Subject: [PHP] How can I detect an exception without using try/catch?
>
>
> Specifically, the __destruct() method of certain objects will be
> called if an object goes out of scope due to an exception. Since
> the __destruct() method didn't call the code that caused the
> exception, it can't catch it.
>
> I need the __destruct() method to behave differently if it's
> called while an exception is in progress than if it's called
> simply because the object is unset.
>
> Searches of the docs has yet to turn up anything and Google isn't
> helping. Anyone have any pointers?
>
> --
> Bill Moran
> http://www.potentialtech.com
> http://people.collaborativefusion.com/~wmoran/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
_________________________________________________________________
Drag n’ drop—Get easy photo sharing with Windows Live™ Photos.
http://www.microsoft.com/windows/windowslive/products/photos.aspx