Re: How can I detect an exception without using try/catch?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



a POSSIBLE work round.

see if u can use
http://in2.php.net/manual/en/function.error-get-last.php or
http://in2.php.net/manual/en/reserved.variables.phperrormsg.php but
they are not working as expected with xdebug. use them in the
__destruct function to check for an uncaught exception

alternatively.. this approach is NOT RECOMMENDED. use it only if u run
out of options

keep the destructor empty. catch the exception and call a function to
perform destruction and then unset the object.
at the end of script, check if the object is set, call the function to
perform destruction. (php dosent destroy the object if the exception
is caught)

Kranthi.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux