Having installed Laravel and Bugsnag using the relevant documentation, I found that an NotFoundHttpException
error for instance is not reported to Bugsnag (but notifyError
yes). My question is how to set it so that all errors are reported, without using these lines over and over:
Bugsnag::notifyError('ErrorType', 'Something bad happened');
or
try {
// Some potentially crashy code
} catch (Exception $ex) {
Bugsnag::notifyException($ex);
}
I'm thinking of using the Handler
in app/exceptions
like so:
public function report(Exception $e)
{
Bugsnag::notifyException($e);
parent::report($e);
}
But if it's not mentioned in the Laravel/Bugsnag integration docs, is it a good practice? This Laracast video doesn't describe any changes to the exceptions handler and the setup seems to work as intended.