Catching any error with PEAR MDB2
| From: | rav k | Date: | Sat, 23 Dec 2006 12:57:50 +0000 |
| Subject: | Catching any error with PEAR MDB2 | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26185@lists.php.net to get a copy of this message | ||
Hi
What I would like to do is add some code to my website so that if there is any error at all I can bring up a standard error page and display the error message there.
I usually use something like this:
if (PEAR::isError($statement)) {
die($statement->getUserInfo());
}
But it's not very good at catching everything and only works for a particular statement.
Can you point me to any good tutorials where I can see working examples or explain how this should work?? I really want to be able to add the code to my 'config.php' file and it will work for every page thereon.
Thanks
rav
_________________________________________________________________
Experience the magic of the holidays. Talk to Santa on Messenger. http://clk.atdmt.com/MSN/go/msnnkwme0080000001msn/direct/01/?href=http://imagine-windowslive.com/minisites/santabot/default.aspx?locale=en-us