Exemple #1
0
 /**
  * Report or log an exception.
  *
  * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
  *
  * @param \Exception $e
  *
  * @return \Illuminate\Http\Response|void
  */
 public function report(Exception $e)
 {
     if ($e instanceof ModelNotFoundException) {
         return abort(404);
     }
     return parent::report($e);
 }
Exemple #2
0
 /**
  * Report or log an exception.
  *
  * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
  *
  * @param  \Exception  $e
  * @return void
  */
 public function report(Exception $e)
 {
     // If a user is logged in, we'll set him as the target user for which the errors will occur.
     if (auth()->check()) {
         Bugsnag::setUser(['name' => auth()->user()->name, 'email' => auth()->user()->email]);
     }
     return parent::report($e);
 }
Exemple #3
0
 /**
  * Report or log an exception.
  *
  * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
  *
  * @param  \Exception  $e
  * @return void
  */
 public function report(Exception $e)
 {
     return parent::report($e);
 }
Exemple #4
0
 /**
  * Report or log an exception.
  *
  * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
  *
  * @param  \Exception  $e
  * @return void
  */
 public function report(Exception $e)
 {
     app('bugsnag')->notifyException($e, []);
     return parent::report($e);
 }