[Debug] Wrap call to ->log in a try catch block
If something goes wrong in the logger, the application ends up with a blank page. Let's display the original exception.
This commit is contained in:
parent
ee69018bf4
commit
18dfef1e2b
|
@ -504,7 +504,11 @@ class ErrorHandler
|
|||
}
|
||||
}
|
||||
if ($this->loggedErrors & $type) {
|
||||
$this->loggers[$type][0]->log($this->loggers[$type][1], $message, $e);
|
||||
try {
|
||||
$this->loggers[$type][0]->log($this->loggers[$type][1], $message, $e);
|
||||
} catch (\Exception $handlerException) {
|
||||
} catch (\Throwable $handlerException) {
|
||||
}
|
||||
}
|
||||
if ($exception instanceof FatalErrorException && !$exception instanceof OutOfMemoryException && $error) {
|
||||
foreach ($this->getFatalErrorHandlers() as $handler) {
|
||||
|
|
Reference in New Issue