report() public method

Report or log an exception.
public report ( Exception $e ) : void
$e Exception
return void
示例#1
0
 /**
  * @return mixed
  */
 public function getReporter() : callable
 {
     $default = function (Exception $e) {
         parent::report($e);
     };
     return $this->reporter ?: $default;
 }
示例#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 ($e instanceof MethodNotAllowedHttpException) {
         $request = app('request');
         debug_log(get_class($e), $request->method() . ' ' . $request->fullUrl());
     }
     return parent::report($e);
 }
 /**
  * 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)
 {
     foreach ($this->dontReport as $type) {
         if ($e instanceof $type) {
             parent::report($e);
         }
     }
     $bugsnag = app('bugsnag');
     if ($bugsnag) {
         $bugsnag->notifyException($e, null, "error");
     }
     parent::report($e);
 }
示例#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)
 {
     foreach ($this->dontReport as $type) {
         if ($e instanceof $type) {
             return parent::report($e);
         }
     }
     // TODO: integrate laravel service provider to work with lumen
     if ($this->app->bound('cask')) {
         $this->app->cask->reportException($e);
     }
     return parent::report($e);
 }
 public function report(Exception $e)
 {
     if (env('APP_ENV') != 'local') {
         try {
             $bugsnag = app('bugsnag');
             if ($bugsnag) {
                 $bugsnag->notifyException($e, null, "error");
             }
         } catch (Exception $e) {
             return $e->getMessage();
         }
     }
     return parent::report($e);
 }
示例#6
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 ($e instanceof ClickatellSendingException) {
         Log::error(ClickatellSendingException::class . ": " . $e->getMessage() . " (code:{$e->getCode()})");
         if (env('APP_ENV') !== 'testing') {
             $options = array('username' => 'legit-bot', 'icon_emoji' => ':mushroom:', 'channel' => '#legit');
             $bot = new Slackbot(env('SLACK_WEBHOOK_URL'), $options);
             $attachment = $bot->buildAttachment("Legit Error")->setPretext("Something went wrong trying to send an SMS with Legit")->setText(ClickatellSendingException::class . ": " . $e->getMessage() . " (code:{$e->getCode()})")->setColor("red");
             $bot->attach($attachment)->send();
             return;
         }
     }
     parent::report($e);
 }
示例#7
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)
 {
     parent::report($e);
 }
 /**
  * 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);
 }
 /**
  * Code / Idea from BugSnag
  */
 public function report(Exception $e)
 {
     $data = ['title' => 'Application Exception Error', 'message' => sprintf("Error Filename %s \n on line %d \n with message %s \n with Code %s", $e->getFile(), $e->getLine(), $e->getMessage(), $e->getCode())];
     Incomings::send($data);
     return parent::report($e);
 }
示例#10
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);
 }