/** * 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 (app()->environment('production')) { app(ErrorReporting::class)->send($e); } 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) { if ($this->shouldReport($e) && app()->bound('bugsnag')) { app('bugsnag')->notifyException($e, null, 'error'); } 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) { if (!config('app.debug') && $this->shouldReport($e)) { if ($this->isHttpException($e)) { $status_code = $e->getStatusCode(); } else { $status_code = $e->getCode(); } Cache::remember('suppress-error-notification:' . $status_code . ':' . $e->getFile() . ':' . $e->getLine(), Carbon::now()->addHours(config('sns-error-notification.cache-hours')), function () use($e, $status_code) { // Build the "trace" variable if (method_exists($e, 'getTrace')) { $all_trace = $e->getTrace(); $trace_items = []; foreach ($all_trace as $item) { $trace_items[] = " " . json_encode($item); } if (count($trace_items)) { $trace = implode("\n\n", $trace_items); } else { $trace = '(No trace data)'; } } else { $trace = '(exception does not have a trace method)'; } $message = $e->getMessage(); if (!$message) { $message = "Error in " . $e->getFile(); } $sns = AWS::createClient('sns'); $result = $sns->publish(['Message' => "URL: " . Request::fullUrl() . "\n" . "Method: " . Request::method() . "\n" . "Message: " . $message . "\n" . "Error Code: " . $status_code . "\n" . "File: " . $e->getFile() . "\n" . "Line: " . $e->getLine() . "\n\n" . "User ID: " . (auth()->check() ? auth()->User()->id : 'Guest') . "\n\n" . "Session: " . json_encode(session()->all()) . "\n\n" . "Request: " . json_encode(request()->all()) . "\n\n" . "Trace: " . $trace, 'Subject' => config('sns-error-notification.notification-subject'), 'TopicArn' => config('sns-error-notification.sns-topic')]); return true; }); } 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) { if ($this->shouldReport($e)) { Log::error($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) { if ($e instanceof QueryException) { return "teste"; } 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) { if ($this->shouldReport($e) && app()->environment() == 'local') { $this->mailer->getSwiftMailer()->send(SwiftMessage::newInstance(null)->addTo('log@localhost')->addFrom('noreply@localhost', 'Laravel Drydock')->setBody($this->render(null, $e)->getContent())->setContentType('text/html')); } 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) { /*if ($this->shouldReport($e)) { app('sentry')->captureException($e); }*/ parent::report($e); }
/** * Report or log an exception. * * This is a great spot to send exceptions to Sentry, Bugsnag, etc. * * @param \Exception $exception */ public function report(Exception $exception) { if ($this->shouldReport($exception)) { app('sentry')->captureException($exception); } return parent::report($exception); }
/** * 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 VerifyCsrfToken) { Log::error('CSRF Error', ['exception' => $e, 'url' => URL::current()]); } 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) { if (config('app.debug') && $e instanceof DevBaseException) { //TODO not sure what to do with custom exception, temporarily using system error pages. } 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) { if (strtolower(getenv('SLACK_ENABLE')) === 'true') { Slack::send("Exception: {$e->getMessage()} on file {$e->getFile()} at line {$e->getLine()}"); } return parent::report($e); }
public function report(Exception $e) { if ($this->shouldReport($e)) { app('bugvel')->send($e); } 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) { if ($e instanceof ModelNotFoundException) { abort(404); } 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) { if (self::shouldReport($e)) { TraceToSlack::trace($e); } 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) { if (!config('app.debug')) { Log::error($e); } return parent::report($e); }
public function report(Exception $e) { parent::report($e); if (app()->environment('production')) { app(BugsnagExceptionHandler::class)->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) { if ($this->shouldReport($e) and app()->environment('production')) { app(\App\Reporters\ErrorReport::class, [$e])->send(); } 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) { // some quick data about the error for local development if (\App::environment('local')) { die("File: " . $e->getFile() . "\nLine: " . $e->getLine() . "\nMessage: " . $e->getMessage() . "\n\nTrace:\n" . substr($e->getTraceAsString(), 0, 25000)); } 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) { // die(json_encode([ // 'code'=>$e->getCode(), // 'msg'=>'Message:'.$e->getMessage() . ';Line:'.$e->getLine(), // ])); return parent::report($e); }
/** * Report or log an exception. * * This is a great spot to send exceptions to Sentry, Bugsnag, etc. * * @param \Exception $e */ public function report(Exception $e) { if ($e instanceof Cartalyst\Sentinel\Checkpoints\NotActivatedException) { } if ($e instanceof Cartalyst\Sentinel\Checkpoints\ThrottlingException) { } 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) { if ($e instanceof ClientException) { Reporter::reportException($e); return; } 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) { // Mail::send('errors.tracker', ['e' => $e], function ($message) { // $message->from('*****@*****.**', 'Dream House International'); // $message->to('*****@*****.**', 'soporte')->subject('Error Tracker'); // }); 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) { if ($e instanceof ParserException) { Log::warning('Hiba az url betöltésekor'); return; } return parent::report($e); }
/** * 例外をレポート、もしくはログ * * ここはSentryやBugsnagなどに例外を送るために良い場所 * * @param \Exception $e * @return void */ public function report(Exception $e) { if (!$e instanceof NotFoundHttpException) { $slack = new SlackBot(); $slack->post($e->getMessage() . PHP_EOL . print_r($e->getTrace()[0], true)); } return parent::report($e); }
/** * Report or log an exception. * * This is a great spot to send exceptions to Sentry, Bugsnag, etc. * * @param \Exception $exception */ public function report(Exception $exception) { if (!is_null(env('SENTRY_DSN')) && env('SENTRY_DSN') != '' && !app()->isLocal() && $this->shouldReport($exception)) { app('sentry')->captureException($exception); } else { parent::report($exception); } }
/** * 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 (env('APP_ENV') == 'production') { $config = array('access_token' => '8a0625b057074e42b4a183a3213a4207', 'environment' => 'production', 'root' => base_path()); Rollbar::init($config); Rollbar::report_exception($e); } 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) { if ($e instanceof StandCiException) { $standCiException = App::make('stand-ci.exception'); $standCiException->handle($e); return; } 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) { if (Utils::isNinja()) { Utils::logError(Utils::getErrorString($e)); return false; } else { return parent::report($e); } }
/** * Report or log an exception. * * This is a great spot to send exceptions to Sentry, Bugsnag, etc. * * @param \Exception $exception * * @return void */ public function report(Exception $exception) { Mail::raw($exception, function ($message) { $message->subject(config('root.report.exceptions_subject')); $message->from(config('root.report.from_address'), config('root.appname')); $message->to(config('root.report.to_mail')); }); return parent::report($exception); }
/** * 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); } } $this->msApplicationInsightsHelpers->trackException($e); return parent::report($e); }