Hi there
I am trying to implement customized error handling in PHP. Now the code seems pretty generic. I have created a function to handle errors (myErrorHandler) and have the statement set_error_handler("myErrorHandler") to divert system errors to this function.
But it is not working. The myErrorHandler function is not being called when an error occurs. Is there some setting that needs to be changed in the php.ini file to enable set_error_handler() to be used. Otherwise I just cannot figure out what the problem is.
Many thanks
langals
What error type are you waiting to handle with your function?
There are some error types that cannot be handled:
E_ERROR, E_PARSE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR and E_COMPILE_WARNING
Thanks for replying
It doesn't seem to be picking up E_NOTICE and E_WARNING errors, which should be able to be handled by a customized error handler.
Any ideas?