Merge pull request #28915 from nextcloud/fix/improve-bug-reporting

Improve syntax error reporting
This commit is contained in:
Christoph Wurst 2021-09-30 12:30:50 +02:00 committed by GitHub
commit 05cfbf472c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}