ldc-boutique-cnc/app/Exceptions/Handler.php

40 lines
858 B
PHP
Raw Normal View History

2020-10-30 17:26:00 +01:00
<?php
namespace App\Exceptions;
2023-02-08 09:57:42 +01:00
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
2020-10-30 17:26:00 +01:00
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array<int,class-string<Throwable>>
2020-10-30 17:26:00 +01:00
*/
2022-09-03 16:56:16 +02:00
protected $dontReport = [];
2020-10-30 17:26:00 +01:00
/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array<int,string>
2020-10-30 17:26:00 +01:00
*/
protected $dontFlash = [
'password',
'password_confirmation',
];
2022-12-19 16:20:00 +01:00
2023-02-08 09:57:42 +01:00
/**
* Register the exception handling callbacks for the application.
*
* @return void
*/
2022-12-19 16:20:00 +01:00
public function register()
{
2023-02-08 09:57:42 +01:00
$this->reportable(function (\Throwable $e) {
if (app()->bound('sentry')) {
app('sentry')->captureException($e);
}
2022-12-19 16:20:00 +01:00
});
}
2020-10-30 17:26:00 +01:00
}