當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Handler::report方法代碼示例

本文整理匯總了PHP中Laravel\Lumen\Exceptions\Handler::report方法的典型用法代碼示例。如果您正苦於以下問題:PHP Handler::report方法的具體用法?PHP Handler::report怎麽用?PHP Handler::report使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Laravel\Lumen\Exceptions\Handler的用法示例。


在下文中一共展示了Handler::report方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getReporter

 /**
  * @return mixed
  */
 public function getReporter() : callable
 {
     $default = function (Exception $e) {
         parent::report($e);
     };
     return $this->reporter ?: $default;
 }
開發者ID:chatbox-inc,項目名稱:lumen-providers,代碼行數:10,代碼來源:Handler.php

示例2: report

 /**
  * 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);
 }
開發者ID:acmadi,項目名稱:MinionCMS,代碼行數:16,代碼來源:Handler.php

示例3: report

 /**
  * 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);
 }
開發者ID:holidaypirates,項目名稱:bugsnag-lumen,代碼行數:21,代碼來源:BugsnagExceptionHandler.php

示例4: report

 /**
  * 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);
 }
開發者ID:bcmw,項目名稱:lumen-skeleton,代碼行數:21,代碼來源:Handler.php

示例5: report

 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);
 }
開發者ID:matiux,項目名稱:lumen-expander,代碼行數:14,代碼來源:ExceptionHandler.php

示例6: report

 /**
  * 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);
 }
開發者ID:etiennemarais,項目名稱:legit,代碼行數:22,代碼來源:Handler.php

示例7: report

 /**
  * 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);
 }
開發者ID:ssddanbrown,項目名稱:BookStack-Site,代碼行數:12,代碼來源:Handler.php

示例8: report

 /**
  * 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);
 }
開發者ID:ellipsesynergie,項目名稱:backend-skeleton,代碼行數:12,代碼來源:Handler.php

示例9: report

 /**
  * 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);
 }
開發者ID:alfred-nutile-inc,項目名稱:incomings-client,代碼行數:9,代碼來源:IncomingsExceptionHandlerForLumen.php

示例10: report

 /**
  * 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);
 }
開發者ID:nagyistoce,項目名稱:thumbnail-maker,代碼行數:13,代碼來源:Handler.php


注:本文中的Laravel\Lumen\Exceptions\Handler::report方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。