K
K
KOS_MOS2010-12-17 16:22:26
PHP
KOS_MOS, 2010-12-17 16:22:26

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

2 answer(s)
C
casey, 2010-12-17
@casey

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.

O
Oleg Matrozov, 2010-12-17
@Mear

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 question

Ask a Question

731 491 924 answers to any question