18 lines
447 B
PHP
18 lines
447 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
use App\Exceptions\GlobalHandler;
|
||
|
|
use Illuminate\Foundation\Configuration\Exceptions;
|
||
|
|
use Sentry\State\HubInterface;
|
||
|
|
|
||
|
|
return function (Exceptions $exceptions): void {
|
||
|
|
$exceptions->reportable(function (\Throwable $e): void {
|
||
|
|
if (app()->bound(HubInterface::class)) {
|
||
|
|
resolve(HubInterface::class)->captureException($e);
|
||
|
|
}
|
||
|
|
});
|
||
|
|
|
||
|
|
GlobalHandler::afterAppBootstrap($exceptions);
|
||
|
|
};
|