Sending error notices along with line numbers by email...
Posted: Mon Feb 17, 2003 1:57 pm
Hi guys/gals,
I've started sending MySQL errors to my email instead of directly on the site and this for 2 major reasons.
1) the page continues on without error
2) I can manage the error and activate this or that function depending on the error.
What I would like to know is how to send the PHP line number when such an error occurs.
Here's a possible event.
I have a MySQL query which may or may not be well formed, when I use the mysql_query function I also use the OR keyword to MAIL() the mysql_error() along with the query string and the filename. Now what I would like to be able to do is to send the line number where the error occurs. Is that possible?
I guess it's possible because PHP returns the line number when it encounters a syntax error or parse error...
I've never played with trigger_error () would that be usefull?
Thanks for the help.
I've started sending MySQL errors to my email instead of directly on the site and this for 2 major reasons.
1) the page continues on without error
2) I can manage the error and activate this or that function depending on the error.
What I would like to know is how to send the PHP line number when such an error occurs.
Here's a possible event.
I have a MySQL query which may or may not be well formed, when I use the mysql_query function I also use the OR keyword to MAIL() the mysql_error() along with the query string and the filename. Now what I would like to be able to do is to send the line number where the error occurs. Is that possible?
I guess it's possible because PHP returns the line number when it encounters a syntax error or parse error...
I've never played with trigger_error () would that be usefull?
Thanks for the help.