public error ( Slim\Http\Request $request, Slim\Http\Response $response, Exception $exception ) : Slim\Http\Response | ||
$request | Slim\Http\Request | PSR-7 request |
$response | Slim\Http\Response | PSR-7 response |
$exception | Exception | Error to display |
return | Slim\Http\Response | HTTP response |
public function error(Request $request, Response $response, \Exception $exception)
{
if ($this->container instanceof Container) {
$this->container->view->render($response, 'error.tpl', ['errors' => $exception->getMessage(), 'class' => 'video', 'title' => 'Error']);
}
return $response->withStatus(500);
}