当前位置: 首页>>代码示例>>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;未经允许,请勿转载。