Attendize/app/Exceptions/Handler.php

48 lines
1.2 KiB
PHP
Raw Normal View History

2016-02-29 15:59:36 +00:00
<?php
namespace App\Exceptions;
2016-03-30 00:30:02 +00:00
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
2016-09-06 20:39:27 +00:00
use Illuminate\Validation\ValidationException;
2023-05-08 13:38:37 +00:00
//use Symfony\Component\HttpKernel\Exception\HttpException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
2016-02-29 15:59:36 +00:00
2016-03-05 00:18:10 +00:00
//use Bugsnag\BugsnagLaravel\BugsnagExceptionHandler as ExceptionHandler;
2016-02-29 15:59:36 +00:00
2016-03-05 00:18:10 +00:00
class Handler extends ExceptionHandler
{
2016-02-29 15:59:36 +00:00
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport = [
2016-03-30 00:30:02 +00:00
AuthorizationException::class,
2023-05-08 13:38:37 +00:00
//HttpException::class,
2016-03-30 00:30:02 +00:00
ModelNotFoundException::class,
ValidationException::class,
2016-02-29 15:59:36 +00:00
];
/**
2023-05-08 13:38:37 +00:00
* The list of the inputs that are never flashed to the session on validation exceptions.
2016-02-29 15:59:36 +00:00
*
2023-05-08 13:38:37 +00:00
* @var array<int, string>
2016-02-29 15:59:36 +00:00
*/
2023-05-08 13:38:37 +00:00
protected $dontFlash = [
'current_password',
'password',
'password_confirmation',
];
2016-02-29 15:59:36 +00:00
/**
2023-05-08 13:38:37 +00:00
* Register the exception handling callbacks for the application.
2016-02-29 15:59:36 +00:00
*/
2023-05-08 13:38:37 +00:00
public function register(): void
2016-03-05 00:18:10 +00:00
{
2023-05-08 13:38:37 +00:00
// $this->reportable(function (Throwable $e) {
// //
// });
2016-02-29 15:59:36 +00:00
}
}