Re: trapping fatal errors...?

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

 



Christopher J. Bottaro wrote:
Hello,
How can I trap a fatal error (like calling a non existant method, requiring
a non existant file, etc) and go to a user defined error handler?  I tried
set_error_handler(), but it seems to skip over the errors I care about.

Thanks for the help.

It is always safer to handle errors before they happen by checking that you're in a good state before you try to do something.

For example, nonexistent files can be handled by file_exists(). Undefined functions can be checked with function_exists().

Regards, Adam Zey.

--
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