Error handling

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jassiechahal
Forum Newbie
Posts: 3
Joined: Mon May 14, 2007 9:58 pm

Error handling

Post 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
jassiechahal
Forum Newbie
Posts: 3
Joined: Mon May 14, 2007 9:58 pm

re:

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

set_error_handler(). However, it will not handle parse errors last I checked.
Post Reply