report() 공개 메소드

Report or log an exception.
public report ( Exception $e ) : void
$e Exception
리턴 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);
 }
예제 #5
0
 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);
 }
예제 #8
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);
 }
 /**
  * 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);
 }