ldc-mesbr-app/app/Exceptions/Handler.php

58 lines
1.3 KiB
PHP
Raw Normal View History

2019-01-15 14:17:15 +01:00
<?php
namespace App\Exceptions;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
2021-04-20 12:22:04 +02:00
use Throwable;
2019-01-15 14:17:15 +01:00
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
//
];
/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
*/
protected $dontFlash = [
'password',
'password_confirmation',
];
/**
* Report or log an exception.
*
2021-04-20 12:22:04 +02:00
* @param \Throwable $exception
2019-01-15 14:17:15 +01:00
* @return void
*/
2021-04-20 12:22:04 +02:00
public function report(Throwable $exception)
2019-01-15 14:17:15 +01:00
{
parent::report($exception);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
2021-04-20 12:22:04 +02:00
* @param \Throwable $exception
2019-01-15 14:17:15 +01:00
* @return \Illuminate\Http\Response
*/
2021-04-20 12:22:04 +02:00
public function render($request, Throwable $exception)
2019-01-15 14:17:15 +01:00
{
2019-03-12 11:43:50 +01:00
// if ($exception instanceof \ErrorException) {
// $response = response()->view('errors.500', [], 500);
// return $this->toIlluminateResponse($response,$exception);
// }
2019-02-28 09:28:24 +01:00
2019-01-15 14:17:15 +01:00
return parent::render($request, $exception);
}
}