X-Git-Url: https://git.rapsys.eu/airbundle/blobdiff_plain/c5576c3388507075d79944120d610e9692d91da6..2ef6650cb5125638bf482a78adb7edd0522eaf8a:/Controller/ErrorController.php diff --git a/Controller/ErrorController.php b/Controller/ErrorController.php new file mode 100644 index 0000000..eb53209 --- /dev/null +++ b/Controller/ErrorController.php @@ -0,0 +1,40 @@ +getStatusCode().' '.$this->translator->trans($exception->getStatusText()); + + //Set title + $title = $section.' - '.$this->translator->trans($this->config['site']['title']); + + //Set the message + $message = $exception->getMessage(); + + //Set the trace + $trace = $exception->getAsString(); + + //Render template + return $this->render( + '@RapsysAir/error.html.twig', + ['title' => $title, 'section' => $section, 'message' => $message, 'trace' => $trace]+$this->context + ); + } +}