Click to See Complete Forum and Search --> : Adjusting What Errors Do


jeditdog
01-06-2006, 05:25 PM
I'm launching a new site and until things get smoothed out, it would be nice to know everytime an error is thrown.

Is there a way that I could get the system to email me anytime an error or warning comes up? And instead of it giving something ugly to the user, It could just say some message I choose like 'There has been a problem, and we're aware of it. Please check back in 30 minutes' -- or something like that?

balloonbuffoon
01-06-2006, 07:00 PM
Check out this function:
set_error_handler() (http://us2.php.net/manual/en/function.set-error-handler.php)
It will call a custom function instead of spitting out the normal error. In your own function you can email yourself and echo a friendly error warning.

--Steve