From 0d845b764b942f6c3a0f1067c73db9142d027010 Mon Sep 17 00:00:00 2001 From: slawkens Date: Fri, 28 Oct 2022 13:40:16 +0200 Subject: [PATCH] Add exception class from develop --- system/exception.php | 3 +-- system/templates/exception.html.twig | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/system/exception.php b/system/exception.php index 5c76d66b..17a48de8 100644 --- a/system/exception.php +++ b/system/exception.php @@ -39,8 +39,7 @@ function exception_handler($exception) { // we just replace some values manually // cause in case Twig throws exception, we can show it too $content = file_get_contents($template_file); - $content = str_replace(array('{{ BASE_URL }}', '{{ message }}', '{{ backtrace }}', '{{ powered_by }}'), array(BASE_URL, $message, $backtrace_formatted, base64_decode('UG93ZXJlZCBieSA8YSBocmVmPSJodHRwOi8vbXktYWFjLm9yZyIgdGFyZ2V0PSJfYmxhbmsiPk15QUFDLjwvYT4=')), $content); - + $content = str_replace(array('{{ BASE_URL }}', '{{ exceptionClass }}', '{{ message }}', '{{ backtrace }}', '{{ powered_by }}'), array(BASE_URL, get_class($exception), $message, $backtrace_formatted, base64_decode('UG93ZXJlZCBieSA8YSBocmVmPSJodHRwOi8vbXktYWFjLm9yZyIgdGFyZ2V0PSJfYmxhbmsiPk15QUFDLjwvYT4=')), $content); echo $content; } diff --git a/system/templates/exception.html.twig b/system/templates/exception.html.twig index 61da8085..3731f8d1 100644 --- a/system/templates/exception.html.twig +++ b/system/templates/exception.html.twig @@ -64,6 +64,8 @@

Whoops something went wrong...

+ Exception class: {{ exceptionClass }}() +

{{ message }}


Backtrace: