Answer the question
In order to leave comments, you need to log in
Displaying an Exception Message with XDebug [PHP]
Displaying error and exception messages with xdebug is pretty handy.
But in addition to the output, there is a task to log the error that has arisen and send a letter to the administrator.
I set my handlers with set_error_handler and set_exception_handler.
In the handlers, I perform all the necessary actions, then in set_error_handler I do return false and the xdebug error handler is launched, which displays a message on the screen, but there is no such mechanism for the exception handler - you cannot call the previous handler.
Has anyone encountered such a problem?
Answer the question
In order to leave comments, you need to log in
It seems to me that sending an error message to email from php is wrong.
It is more logical to grab error_log once an hour and send it to the mail.
Ahem... either I misunderstood you... or...
When calling set_exception_handler() , it seems to return the name of the previous handler, which no one bothers you to save and call later.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question