October\Rain\Foundation\Exception\Handler

Source: ~/vendor/october/rain/src/Foundation/Exception/Handler.php

Extends:

  • Illuminate\Foundation\Exceptions\Handler

Implements:

  • Illuminate\Contracts\Debug\ExceptionHandler

Protected properties

protected array $dontReport

A list of the exception types that should not be reported.

protected array $handlers

All of the register exception handlers.

Show inherited protected properties

Inherited protected properties

  • protected Illuminate\Contracts\Container\Container $container - defined in Illuminate\Foundation\Exceptions\Handler. The container implementation.
  • protected array $internalDontReport - defined in Illuminate\Foundation\Exceptions\Handler. A list of the internal exception types that should not be reported.
  • protected array $dontFlash - defined in Illuminate\Foundation\Exceptions\Handler. A list of the inputs that are never flashed for validation exceptions.

Public methods

public void error(Closure $callback)

Register an application error handler.

Parameters
  • Closure $callback

public Illuminate\Http\Response render(Illuminate\Http\Request $request, Exception $exception)

Render an exception into an HTTP response.

Parameters
  • Illuminate\Http\Request $request
  • Exception $exception

public void report(Exception $exception)

Report or log an exception.

This is a great spot to send exceptions to Sentry, Bugsnag, etc.

Parameters
  • Exception $exception

Show inherited public methods

Inherited public methods

  • public void __construct(Illuminate\Contracts\Container\Container $container) - defined in Illuminate\Foundation\Exceptions\Handler. Create a new exception handler instance.
  • public void renderForConsole(Symfony\Component\Console\Output\OutputInterface $output, Exception $e) - defined in Illuminate\Foundation\Exceptions\Handler. Render an exception to the console.
  • public bool shouldReport(Exception $e) - defined in Illuminate\Foundation\Exceptions\Handler. Determine if the exception should be reported.

Protected methods

protected void callCustomHandlers(Exception $exception, bool $fromConsole=false)

Handle the given exception.

Parameters
  • Exception $exception
  • bool $fromConsole

protected array context()

Get the default context variables for logging.

protected int getStatusCode(Exception $exception)

Checks if the exception implements the HttpExceptionInterface, or returns as generic 500 error code for a server side error.

Parameters
  • Exception $exception

protected bool handlesException(Closure $handler, Exception $exception)

Determine if the given handler handles this exception.

Parameters
  • Closure $handler
  • Exception $exception

protected bool hints(ReflectionFunction $reflection, Exception $exception)

Determine if the given handler type hints the exception.

Parameters
  • ReflectionFunction $reflection
  • Exception $exception

Show inherited protected methods

Inherited protected methods

  • protected array convertExceptionToArray(Exception $e) - defined in Illuminate\Foundation\Exceptions\Handler. Convert the given exception to an array.
  • protected Symfony\Component\HttpFoundation\Response convertExceptionToResponse(Exception $e) - defined in Illuminate\Foundation\Exceptions\Handler. Create a Symfony response for the given exception.
  • protected Symfony\Component\HttpFoundation\Response convertValidationExceptionToResponse(Illuminate\Validation\ValidationException $e, Illuminate\Http\Request $request) - defined in Illuminate\Foundation\Exceptions\Handler. Create a response object from the given validation exception.
  • protected Illuminate\Http\Response invalid(Illuminate\Http\Request $request, Illuminate\Validation\ValidationException $exception) - defined in Illuminate\Foundation\Exceptions\Handler. Convert a validation exception into a response.
  • protected Illuminate\Http\JsonResponse invalidJson(Illuminate\Http\Request $request, Illuminate\Validation\ValidationException $exception) - defined in Illuminate\Foundation\Exceptions\Handler. Convert a validation exception into a JSON response.
  • protected bool isHttpException(Exception $e) - defined in Illuminate\Foundation\Exceptions\Handler. Determine if the given exception is an HTTP exception.
  • protected Exception prepareException(Exception $e) - defined in Illuminate\Foundation\Exceptions\Handler. Prepare exception for rendering.
  • protected Illuminate\Http\JsonResponse prepareJsonResponse(Illuminate\Http\Request $request, Exception $e) - defined in Illuminate\Foundation\Exceptions\Handler. Prepare a JSON response for the given exception.
  • protected Symfony\Component\HttpFoundation\Response prepareResponse(Illuminate\Http\Request $request, Exception $e) - defined in Illuminate\Foundation\Exceptions\Handler. Prepare a response for the given exception.
  • protected string renderExceptionWithSymfony(Exception $e, bool $debug) - defined in Illuminate\Foundation\Exceptions\Handler. Render an exception to a string using Symfony.
  • protected string renderExceptionWithWhoops(Exception $e) - defined in Illuminate\Foundation\Exceptions\Handler. Render an exception to a string using "Whoops".
  • protected Symfony\Component\HttpFoundation\Response renderHttpException(Symfony\Component\HttpKernel\Exception\HttpException $e) - defined in Illuminate\Foundation\Exceptions\Handler. Render the given HttpException.
  • protected bool shouldntReport(Exception $e) - defined in Illuminate\Foundation\Exceptions\Handler. Determine if the exception is in the "do not report" list.
  • protected Illuminate\Http\Response toIlluminateResponse(Symfony\Component\HttpFoundation\Response $response, Exception $e) - defined in Illuminate\Foundation\Exceptions\Handler. Map the given exception into an Illuminate response.
  • protected Illuminate\Http\Response unauthenticated(Illuminate\Http\Request $request, Illuminate\Auth\AuthenticationException $exception) - defined in Illuminate\Foundation\Exceptions\Handler. Convert an authentication exception into a response.
  • protected Whoops\Handler\Handler whoopsHandler() - defined in Illuminate\Foundation\Exceptions\Handler. Get the Whoops handler for the application.