Re: trapping fatal errors...?

From: Date: Mon, 12 Jun 2006 23:20:54 +0000
Subject: Re: trapping fatal errors...?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-237855@lists.php.net to get a copy of this message
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.

« previous php.general (#237855) next »