29 lines
574 B
PHP
29 lines
574 B
PHP
<?php
|
|
|
|
namespace App\Exceptions;
|
|
|
|
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
|
|
|
class Handler extends ExceptionHandler
|
|
{
|
|
/**
|
|
* A list of the exception types that are not reported.
|
|
*
|
|
* @var array
|
|
*/
|
|
#[\Override]
|
|
protected $dontReport = [];
|
|
|
|
/**
|
|
* Register
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
$this->reportable(function (\Throwable $e): void {
|
|
if (app()->bound('sentry')) {
|
|
resolve('sentry')->captureException($e);
|
|
}
|
|
});
|
|
}
|
|
}
|