ldc-com-app-bo/app/Exceptions/Handler.php

42 lines
902 B
PHP
Raw Normal View History

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