/** * {@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); }
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); }