Handler
class Handler implements ExceptionHandler (View source)
Properties
protected Container | $container | The container implementation. |
|
protected array | $dontReport | A list of the exception types that are not reported. |
|
protected array | $internalDontReport | A list of the internal exception types that should not be reported. |
|
protected array | $dontFlash | A list of the inputs that are never flashed for validation exceptions. |
Methods
Get the default context variables for logging.
Convert an authentication exception into a response.
Create a response object from the given validation exception.
Convert a validation exception into a response.
Convert a validation exception into a JSON response.
Get the Whoops handler for the application.
Render an exception to a string using Symfony.
Render the given HttpException.
Register the error template hint paths.
Get the view used to render HTTP exceptions.
Map the given exception into an Illuminate response.
Prepare a JSON response for the given exception.
Details
void
__construct(Container $container)
Create a new exception handler instance.
void
report(Exception $e)
Report or log an exception.
bool
shouldReport(Exception $e)
Determine if the exception should be reported.
protected bool
shouldntReport(Exception $e)
Determine if the exception is in the "do not report" list.
protected array
exceptionContext(Exception $e)
Get the default exception context variables for logging.
protected array
context()
Get the default context variables for logging.
protected Response
unauthenticated(Request $request, AuthenticationException $exception)
Convert an authentication exception into a response.
protected Response
convertValidationExceptionToResponse(ValidationException $e, Request $request)
Create a response object from the given validation exception.
protected Response
invalid(Request $request, ValidationException $exception)
Convert a validation exception into a response.
protected JsonResponse
invalidJson(Request $request, ValidationException $exception)
Convert a validation exception into a JSON response.
protected Response
prepareResponse(Request $request, Exception $e)
Prepare a response for the given exception.
protected Response
convertExceptionToResponse(Exception $e)
Create a Symfony response for the given exception.
protected string
renderExceptionContent(Exception $e)
Get the response content for the given exception.
protected string
renderExceptionWithWhoops(Exception $e)
Render an exception to a string using "Whoops".
protected Handler
whoopsHandler()
Get the Whoops handler for the application.
protected string
renderExceptionWithSymfony(Exception $e, bool $debug)
Render an exception to a string using Symfony.
protected Response
renderHttpException(HttpExceptionInterface $e)
Render the given HttpException.
protected void
registerErrorViewPaths()
Register the error template hint paths.
protected string
getHttpExceptionView(HttpExceptionInterface $e)
Get the view used to render HTTP exceptions.
protected Response
toIlluminateResponse(Response $response, Exception $e)
Map the given exception into an Illuminate response.
protected JsonResponse
prepareJsonResponse(Request $request, Exception $e)
Prepare a JSON response for the given exception.
protected array
convertExceptionToArray(Exception $e)
Convert the given exception to an array.
void
renderForConsole(OutputInterface $output, Exception $e)
Render an exception to the console.
protected bool
isHttpException(Exception $e)
Determine if the given exception is an HTTP exception.