ldc-le-gaulois-pro/app/Exceptions/Handler.php

41 lines
888 B
PHP
Raw Normal View History

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