Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function __invoke($error, Request $request, Response $response, callable $out = null)
 {
     $whoops = new Run();
     $whoops->pushHandler(new PrettyPageHandler());
     $whoops->register();
     $method = Run::EXCEPTION_HANDLER;
     ob_start();
     $whoops->{$method}($error);
     $response = ob_get_clean();
     return StringResponse::html($response, 500);
 }
Esempio n. 2
0
 public static function handle($error)
 {
     $whoops = new Run();
     $whoops->pushHandler(new PrettyPageHandler());
     $whoops->register();
     $method = Run::EXCEPTION_HANDLER;
     ob_start();
     $whoops->{$method}($error);
     $response = ob_get_clean();
     return StringResponse::html($response, 500);
 }