Closed borgogelli closed 9 years ago
Currently, This option is not supported. Why do you need this option?
I can't understand the following code...
class WhoopsMiddleware extends Middleware {
....
$app->container->singleton('whoopsJsonResponseHandler', function() {
$handler = new JsonResponseHandler();
$handler->onlyForAjaxRequests(true);
return $handler;
});
....
is the JsonResponseHandler always available ?
we like to use two handlers like in the following code:
$whoops->pushHandler(new Whoops\Handler\PrettyPageHandler); $whoops->pushHandler(new Whoops\Handler\JsonResponseHandler)
By default, The JsonResponseHandler
is always available when you added this middleware.
If the user request is AJAX and got exception. It will handled by JsonResponseHandler
.
If the user request is NOT AJAX and got exception. It will NOT handled by JsonResponseHandler
.
Also, the PrettyPageHandler
is the default handler.
How I can enable/disable the JsonResponseHandler ?
Thank you in advance
Greeting from Italy
Andrea