File tree Expand file tree Collapse file tree 4 files changed +1138
-83
lines changed
Expand file tree Collapse file tree 4 files changed +1138
-83
lines changed Original file line number Diff line number Diff line change 1010use Illuminate \Http \JsonResponse ;
1111use Illuminate \Http \Request ;
1212use Illuminate \Http \Response ;
13+ use Illuminate \Support \Facades \Config ;
1314use Illuminate \Validation \ValidationException ;
1415use Symfony \Component \HttpKernel \Exception \MethodNotAllowedHttpException ;
1516use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
@@ -41,9 +42,18 @@ class Handler extends ExceptionHandler
4142 *
4243 * @param Exception $exception
4344 * @return void
45+ * @throws Exception
4446 */
4547 public function report (Exception $ exception )
4648 {
49+ if (
50+ $ this ->shouldReport ($ exception )
51+ && Config::get ('app.env ' ) === 'production '
52+ && app ()->bound ('sentry ' )
53+ ) {
54+ app ('sentry ' )->captureException ($ exception );
55+ }
56+
4757 parent ::report ($ exception );
4858 }
4959
Original file line number Diff line number Diff line change 2020 "pda/pheanstalk" : " ^4.0" ,
2121 "predis/predis" : " ^1.1" ,
2222 "pusher/pusher-php-server" : " ^3.4" ,
23+ "sentry/sentry-laravel" : " 1.0.2" ,
2324 "tymon/jwt-auth" : " 1.0.*"
2425 },
2526 "require-dev" : {
You can’t perform that action at this time.
0 commit comments