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;
|
|
|
|
|
|
2024-01-23 08:43:56 +01:00
|
|
|
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
|
|
|
|
|
*/
|
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
|
|
|
|
|
*/
|
|
|
|
|
protected $dontFlash = [
|
|
|
|
|
'current_password',
|
|
|
|
|
'password',
|
|
|
|
|
'password_confirmation',
|
|
|
|
|
];
|
2024-01-23 08:43:56 +01:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Register
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function register()
|
|
|
|
|
{
|
|
|
|
|
$this->reportable(function (\Throwable $e) {
|
|
|
|
|
if (app()->bound('sentry')) {
|
|
|
|
|
app('sentry')->captureException($e);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
2021-11-18 14:36:06 +01:00
|
|
|
}
|