How to catch error.
Hi:
I use pg_connect() to connect to my postgresql database, when there is a mistake, the php engine will echo the error message, can someone tell me how to catch this error message to give its value to a variable. I guess error_handler can do, any other methods?
eg. I want to catch this error message and make it the value of a variable named $messagebody, and then send it to my mailbox.
Your help would be appreciated!
Yuping Wang
Thanks!
|