diff options
author | ArthurHoaro <arthur@hoa.ro> | 2020-10-20 18:32:46 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2020-10-20 18:32:46 +0200 |
commit | 5c06c0870f8e425c2d4ed0f7c330c13e1605628e (patch) | |
tree | dae15a87762c4a95c2b1622fad6391e55373486f /application/front/controller/visitor/ErrorController.php | |
parent | d8030c8155ee4c20573848b2444f6df0b65d1662 (diff) | |
download | Shaarli-5c06c0870f8e425c2d4ed0f7c330c13e1605628e.tar.gz Shaarli-5c06c0870f8e425c2d4ed0f7c330c13e1605628e.tar.zst Shaarli-5c06c0870f8e425c2d4ed0f7c330c13e1605628e.zip |
Dislay an error if an exception occurs in the error handler
Related to #1598
Diffstat (limited to 'application/front/controller/visitor/ErrorController.php')
-rw-r--r-- | application/front/controller/visitor/ErrorController.php | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/application/front/controller/visitor/ErrorController.php b/application/front/controller/visitor/ErrorController.php index 10aa84c8..8da11172 100644 --- a/application/front/controller/visitor/ErrorController.php +++ b/application/front/controller/visitor/ErrorController.php | |||
@@ -28,10 +28,7 @@ class ErrorController extends ShaarliVisitorController | |||
28 | // Internal error (any other Throwable) | 28 | // Internal error (any other Throwable) |
29 | if ($this->container->conf->get('dev.debug', false)) { | 29 | if ($this->container->conf->get('dev.debug', false)) { |
30 | $this->assignView('message', $throwable->getMessage()); | 30 | $this->assignView('message', $throwable->getMessage()); |
31 | $this->assignView( | 31 | $this->assignView('stacktrace', exception2text($throwable)); |
32 | 'stacktrace', | ||
33 | nl2br(get_class($throwable) .': '. PHP_EOL . $throwable->getTraceAsString()) | ||
34 | ); | ||
35 | } else { | 32 | } else { |
36 | $this->assignView('message', t('An unexpected error occurred.')); | 33 | $this->assignView('message', t('An unexpected error occurred.')); |
37 | } | 34 | } |