Stop logging errors that use a custom view

Having a custom view implies that a friendly message is displayed to
the user, in which case we can bet that the exception won't need to be
"debugged" per se.
This commit is contained in:
Toby Zerner 2018-11-11 17:57:55 +10:30
parent 295a007cd5
commit 903c1e329d

View File

@ -81,11 +81,10 @@ class HandleErrorsWithView implements Middleware
$status = $errorCode;
}
// Log the exception (with trace)
$this->logger->debug($error);
if (! $this->view->exists($name = "flarum.forum::error.$status")) {
$name = 'flarum.forum::error.default';
$this->logger->error($error);
}
$view = $this->view->make($name)