diff options
author | Carl Schwan <carl@carlschwan.eu> | 2021-09-21 10:28:26 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2021-09-21 10:28:26 +0200 |
commit | e1c4b648d116befc202d1b8059ffc806e494248d (patch) | |
tree | ba8c40c2ead3fd8621e317116e84a63941c8c922 /lib/private/AppFramework/Http | |
parent | 9f4b640e926c4056b89f89ffa886ff68c5eb8cd7 (diff) | |
download | nextcloud-server-e1c4b648d116befc202d1b8059ffc806e494248d.tar.gz nextcloud-server-e1c4b648d116befc202d1b8059ffc806e494248d.zip |
Improve syntax error reporting
In some cases the error information is not enough to debug it.
Before:
syntax error, unexpected '<<' (T_SL)
/var/www/html/lib/private/AppFramework/Http/Dispatcher.php
158
After:
syntax error, unexpected '<<' (T_SL) in file '/var/www/html/apps/groupfolders/lib/Mount/GroupFolderStorage.php' line 88
/var/www/html/lib/private/AppFramework/Http/Dispatcher.php
158
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib/private/AppFramework/Http')
-rw-r--r-- | lib/private/AppFramework/Http/Dispatcher.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/AppFramework/Http/Dispatcher.php b/lib/private/AppFramework/Http/Dispatcher.php index 6ef7bba4fd6..6bbab42cb79 100644 --- a/lib/private/AppFramework/Http/Dispatcher.php +++ b/lib/private/AppFramework/Http/Dispatcher.php @@ -155,7 +155,7 @@ class Dispatcher { $response = $this->middlewareDispatcher->afterException( $controller, $methodName, $exception); } catch (\Throwable $throwable) { - $exception = new \Exception($throwable->getMessage(), $throwable->getCode(), $throwable); + $exception = new \Exception($throwable->getMessage() . ' in file \'' . $throwable->getFile() . '\' line ' . $throwable->getLine(), $throwable->getCode(), $throwable); $response = $this->middlewareDispatcher->afterException( $controller, $methodName, $exception); } |