Page 1 of 1

Error handling

Posted: Mon May 14, 2007 10:03 pm
by jassiechahal
Hi there,

how can i improve on my error handling

say for example within my php script i have this line of code

$result = this_function_does_not_exit(); // this will cause a fatal error

if i want to send an email to myself in above scenario how can that be done.


thanks in advance

jas

i am using php4.3

re:

Posted: Mon May 14, 2007 10:23 pm
by jassiechahal
thanks for your reply,

i know that this can be handled in that way,
my question is
can we have a error handler that is global in scope for all phps and if there is an error during the execution of the script it could send an email to me


regards,

jas

Posted: Mon May 14, 2007 11:26 pm
by feyd
set_error_handler(). However, it will not handle parse errors last I checked.