Jump to content

email notify when error querying database


jasonc

Recommended Posts

That's right -- basically, as long as you can trap the call the generates the error, you can handle it however you see fit (and so you should). Silent errors -- or even worse, errors that the user sees and can do nothing about -- should never exist.

I always get annoyed when I see the typical "an error has ocurred.... please contact the webmaster". If they know an error occurs, the webmaster should be contacted automatically! That's how it works on every project I've ever written.
Please can you provide information on how you would do this.

thank you



[!--quoteo(post=364279:date=Apr 13 2006, 05:50 AM:name=fenway)--][div class=\'quotetop\']QUOTE(fenway @ Apr 13 2006, 05:50 AM) [snapback]364279[/snapback][/div][div class=\'quotemain\'][!--quotec--]
That's right -- basically, as long as you can trap the call the generates the error, you can handle it however you see fit (and so you should). Silent errors -- or even worse, errors that the user sees and can do nothing about -- should never exist.

I always get annoyed when I see the typical "an error has ocurred.... please contact the webmaster". If they know an error occurs, the webmaster should be contacted automatically! That's how it works on every project I've ever written.
[/quote]
Well, I'm not particularly familiar with PHP's error/exception handling, but at least for DB connections and queries, you can simply call your own custom error handler on any errors instead of calling die(). For other parsing-related errors, I assume that there's a way to catch the DIE signal, much like there is in Perl.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.