2016年1月26日 星期二

Whoops exception callback handler

You would want to use a callback handler.
$whoops = new WhoopsRun();
$handler = new WhoopsCallbackHandler(function($exception, $inspector, $run) {
    //send an email
});
$whoops->pushHandler($handler)->register();
It looks like you are using use statement aliases so I matched your format, but the class is called Whoops\Handler\CallbackHandler.

reference : http://stackoverflow.com/questions/29281480/php-whoops-error-handler-email

沒有留言:

wibiya widget