ldc-doux/app/Exceptions/Handler.php

62 lines
1.2 KiB
PHP
Raw Permalink Normal View History

2021-11-18 14:36:06 +01:00
<?php
2021-12-01 09:01:04 +01:00
/**
* Undocumented class
2022-07-27 14:33:56 +02:00
*
2021-12-01 09:01:04 +01:00
* @category Description
* @package Category
* @author Name <email@email.com>
* @license http://url.com MIT
* @link http://url.com
* phpcs:ignore PEAR.Commenting.FileComment.MissingVersion
*/
2021-11-18 14:36:06 +01:00
namespace App\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
2021-11-18 14:36:06 +01:00
2021-12-01 09:01:04 +01:00
/**
* Undocumented class
2022-07-27 14:33:56 +02:00
*
2021-12-01 09:01:04 +01:00
* @category Description
* @package Category
* @author Name <email@email.com>
* @license http://url.com MIT
* @link http://url.com
*/
2021-11-18 14:36:06 +01:00
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array
*/
2026-10-27 09:12:51 +01:00
#[\Override]
2022-05-19 10:22:56 +02:00
protected $dontReport = [];
2021-11-18 14:36:06 +01:00
/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
*/
2026-10-27 09:12:51 +01:00
#[\Override]
2021-11-18 14:36:06 +01:00
protected $dontFlash = [
'current_password',
'password',
'password_confirmation',
];
/**
* Register
* @return void
*/
public function register()
{
2026-10-27 09:12:51 +01:00
$this->reportable(function (\Throwable $e): void {
if (app()->bound('sentry')) {
2026-10-27 09:12:51 +01:00
resolve('sentry')->captureException($e);
}
});
}
2021-11-18 14:36:06 +01:00
}