www: Show full error message
Change-Id: I2e2dfe8852ef56d8c67a331e61e099de7b375013
diff --git a/src/EventListener/ExceptionListener.php b/src/EventListener/ExceptionListener.php
index ad5f108..83aefca 100644
--- a/src/EventListener/ExceptionListener.php
+++ b/src/EventListener/ExceptionListener.php
@@ -45,12 +45,14 @@
default:
$html = $this->twig->render('errors/500.html.twig', [
'subject' => 'page',
- 'message' => "Our server misbehaved. Bad Server, boo."
+ 'message' => $throwable->getMessage(),
+ 'trace' => $throwable->getTraceAsString()
]);
$response = new Response();
$response->setContent($html);
$event->setResponse($response);
+ break;
}
}
}
diff --git a/templates/errors/500.html.twig b/templates/errors/500.html.twig
index eb4139f..cc85fd4 100644
--- a/templates/errors/500.html.twig
+++ b/templates/errors/500.html.twig
@@ -13,6 +13,7 @@
</span>
<h1 style="color: var(--error-color)">Internal Server Error</h1>
<h2>{{ message }}</h2>
+ <pre>{{ trace }}</pre>
<div class="buttons">
<a href="{{ path('leaf_home') }}">Return to home</a>