api/laravel/Foundation/Exceptions/Handler.yaml
2024-09-26 02:03:21 -07:00

929 lines
24 KiB
YAML

name: Handler
class_comment: null
dependencies:
- name: Closure
type: class
source: Closure
- name: Exception
type: class
source: Exception
- name: AuthorizationException
type: class
source: Illuminate\Auth\Access\AuthorizationException
- name: AuthenticationException
type: class
source: Illuminate\Auth\AuthenticationException
- name: RateLimiter
type: class
source: Illuminate\Cache\RateLimiter
- name: Limit
type: class
source: Illuminate\Cache\RateLimiting\Limit
- name: Unlimited
type: class
source: Illuminate\Cache\RateLimiting\Unlimited
- name: BulletList
type: class
source: Illuminate\Console\View\Components\BulletList
- name: Error
type: class
source: Illuminate\Console\View\Components\Error
- name: Container
type: class
source: Illuminate\Contracts\Container\Container
- name: ExceptionHandlerContract
type: class
source: Illuminate\Contracts\Debug\ExceptionHandler
- name: ExceptionRenderer
type: class
source: Illuminate\Contracts\Foundation\ExceptionRenderer
- name: Responsable
type: class
source: Illuminate\Contracts\Support\Responsable
- name: ModelNotFoundException
type: class
source: Illuminate\Database\Eloquent\ModelNotFoundException
- name: MultipleRecordsFoundException
type: class
source: Illuminate\Database\MultipleRecordsFoundException
- name: RecordsNotFoundException
type: class
source: Illuminate\Database\RecordsNotFoundException
- name: Renderer
type: class
source: Illuminate\Foundation\Exceptions\Renderer\Renderer
- name: HttpResponseException
type: class
source: Illuminate\Http\Exceptions\HttpResponseException
- name: JsonResponse
type: class
source: Illuminate\Http\JsonResponse
- name: RedirectResponse
type: class
source: Illuminate\Http\RedirectResponse
- name: Response
type: class
source: Illuminate\Http\Response
- name: BackedEnumCaseNotFoundException
type: class
source: Illuminate\Routing\Exceptions\BackedEnumCaseNotFoundException
- name: Router
type: class
source: Illuminate\Routing\Router
- name: TokenMismatchException
type: class
source: Illuminate\Session\TokenMismatchException
- name: Arr
type: class
source: Illuminate\Support\Arr
- name: Auth
type: class
source: Illuminate\Support\Facades\Auth
- name: Lottery
type: class
source: Illuminate\Support\Lottery
- name: Reflector
type: class
source: Illuminate\Support\Reflector
- name: ReflectsClosures
type: class
source: Illuminate\Support\Traits\ReflectsClosures
- name: ViewErrorBag
type: class
source: Illuminate\Support\ViewErrorBag
- name: ValidationException
type: class
source: Illuminate\Validation\ValidationException
- name: InvalidArgumentException
type: class
source: InvalidArgumentException
- name: LoggerInterface
type: class
source: Psr\Log\LoggerInterface
- name: LogLevel
type: class
source: Psr\Log\LogLevel
- name: ConsoleApplication
type: class
source: Symfony\Component\Console\Application
- name: CommandNotFoundException
type: class
source: Symfony\Component\Console\Exception\CommandNotFoundException
- name: HtmlErrorRenderer
type: class
source: Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer
- name: RequestExceptionInterface
type: class
source: Symfony\Component\HttpFoundation\Exception\RequestExceptionInterface
- name: SymfonyRedirectResponse
type: class
source: Symfony\Component\HttpFoundation\RedirectResponse
- name: SymfonyResponse
type: class
source: Symfony\Component\HttpFoundation\Response
- name: AccessDeniedHttpException
type: class
source: Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
- name: BadRequestHttpException
type: class
source: Symfony\Component\HttpKernel\Exception\BadRequestHttpException
- name: HttpException
type: class
source: Symfony\Component\HttpKernel\Exception\HttpException
- name: HttpExceptionInterface
type: class
source: Symfony\Component\HttpKernel\Exception\HttpExceptionInterface
- name: NotFoundHttpException
type: class
source: Symfony\Component\HttpKernel\Exception\NotFoundHttpException
- name: Throwable
type: class
source: Throwable
- name: WeakMap
type: class
source: WeakMap
- name: ReflectsClosures
type: class
source: ReflectsClosures
properties:
- name: container
visibility: protected
comment: '# * The container implementation.
# *
# * @var \Illuminate\Contracts\Container\Container'
- name: dontReport
visibility: protected
comment: '# * A list of the exception types that are not reported.
# *
# * @var array<int, class-string<\Throwable>>'
- name: reportCallbacks
visibility: protected
comment: '# * The callbacks that should be used during reporting.
# *
# * @var \Illuminate\Foundation\Exceptions\ReportableHandler[]'
- name: levels
visibility: protected
comment: '# * A map of exceptions with their corresponding custom log levels.
# *
# * @var array<class-string<\Throwable>, \Psr\Log\LogLevel::*>'
- name: throttleCallbacks
visibility: protected
comment: '# * The callbacks that should be used to throttle reportable exceptions.
# *
# * @var array'
- name: contextCallbacks
visibility: protected
comment: '# * The callbacks that should be used to build exception context data.
# *
# * @var array'
- name: renderCallbacks
visibility: protected
comment: '# * The callbacks that should be used during rendering.
# *
# * @var \Closure[]'
- name: shouldRenderJsonWhenCallback
visibility: protected
comment: '# * The callback that determines if the exception handler response should
be JSON.
# *
# * @var callable|null'
- name: finalizeResponseCallback
visibility: protected
comment: '# * The callback that prepares responses to be returned to the browser.
# *
# * @var callable|null'
- name: exceptionMap
visibility: protected
comment: '# * The registered exception mappings.
# *
# * @var array<string, \Closure>'
- name: hashThrottleKeys
visibility: protected
comment: '# * Indicates that throttled keys should be hashed.
# *
# * @var bool'
- name: internalDontReport
visibility: protected
comment: '# * A list of the internal exception types that should not be reported.
# *
# * @var array<int, class-string<\Throwable>>'
- name: dontFlash
visibility: protected
comment: '# * A list of the inputs that are never flashed for validation exceptions.
# *
# * @var array<int, string>'
- name: withoutDuplicates
visibility: protected
comment: '# * Indicates that an exception instance should only be reported once.
# *
# * @var bool'
- name: reportedExceptionMap
visibility: protected
comment: '# * The already reported exception map.
# *
# * @var \WeakMap'
methods:
- name: __construct
visibility: public
parameters:
- name: container
comment: "# * The container implementation.\n# *\n# * @var \\Illuminate\\Contracts\\\
Container\\Container\n# */\n# protected $container;\n# \n# /**\n# * A list of\
\ the exception types that are not reported.\n# *\n# * @var array<int, class-string<\\\
Throwable>>\n# */\n# protected $dontReport = [];\n# \n# /**\n# * The callbacks\
\ that should be used during reporting.\n# *\n# * @var \\Illuminate\\Foundation\\\
Exceptions\\ReportableHandler[]\n# */\n# protected $reportCallbacks = [];\n# \n\
# /**\n# * A map of exceptions with their corresponding custom log levels.\n#\
\ *\n# * @var array<class-string<\\Throwable>, \\Psr\\Log\\LogLevel::*>\n# */\n\
# protected $levels = [];\n# \n# /**\n# * The callbacks that should be used to\
\ throttle reportable exceptions.\n# *\n# * @var array\n# */\n# protected $throttleCallbacks\
\ = [];\n# \n# /**\n# * The callbacks that should be used to build exception context\
\ data.\n# *\n# * @var array\n# */\n# protected $contextCallbacks = [];\n# \n\
# /**\n# * The callbacks that should be used during rendering.\n# *\n# * @var\
\ \\Closure[]\n# */\n# protected $renderCallbacks = [];\n# \n# /**\n# * The callback\
\ that determines if the exception handler response should be JSON.\n# *\n# *\
\ @var callable|null\n# */\n# protected $shouldRenderJsonWhenCallback;\n# \n#\
\ /**\n# * The callback that prepares responses to be returned to the browser.\n\
# *\n# * @var callable|null\n# */\n# protected $finalizeResponseCallback;\n# \n\
# /**\n# * The registered exception mappings.\n# *\n# * @var array<string, \\\
Closure>\n# */\n# protected $exceptionMap = [];\n# \n# /**\n# * Indicates that\
\ throttled keys should be hashed.\n# *\n# * @var bool\n# */\n# protected $hashThrottleKeys\
\ = true;\n# \n# /**\n# * A list of the internal exception types that should not\
\ be reported.\n# *\n# * @var array<int, class-string<\\Throwable>>\n# */\n# protected\
\ $internalDontReport = [\n# AuthenticationException::class,\n# AuthorizationException::class,\n\
# BackedEnumCaseNotFoundException::class,\n# HttpException::class,\n# HttpResponseException::class,\n\
# ModelNotFoundException::class,\n# MultipleRecordsFoundException::class,\n# RecordsNotFoundException::class,\n\
# RequestExceptionInterface::class,\n# TokenMismatchException::class,\n# ValidationException::class,\n\
# ];\n# \n# /**\n# * A list of the inputs that are never flashed for validation\
\ exceptions.\n# *\n# * @var array<int, string>\n# */\n# protected $dontFlash\
\ = [\n# 'current_password',\n# 'password',\n# 'password_confirmation',\n# ];\n\
# \n# /**\n# * Indicates that an exception instance should only be reported once.\n\
# *\n# * @var bool\n# */\n# protected $withoutDuplicates = false;\n# \n# /**\n\
# * The already reported exception map.\n# *\n# * @var \\WeakMap\n# */\n# protected\
\ $reportedExceptionMap;\n# \n# /**\n# * Create a new exception handler instance.\n\
# *\n# * @param \\Illuminate\\Contracts\\Container\\Container $container\n#\
\ * @return void"
- name: register
visibility: public
parameters: []
comment: '# * Register the exception handling callbacks for the application.
# *
# * @return void'
- name: reportable
visibility: public
parameters:
- name: reportUsing
comment: '# * Register a reportable callback.
# *
# * @param callable $reportUsing
# * @return \Illuminate\Foundation\Exceptions\ReportableHandler'
- name: renderable
visibility: public
parameters:
- name: renderUsing
comment: '# * Register a renderable callback.
# *
# * @param callable $renderUsing
# * @return $this'
- name: map
visibility: public
parameters:
- name: from
- name: to
default: 'null'
comment: '# * Register a new exception mapping.
# *
# * @param \Closure|string $from
# * @param \Closure|string|null $to
# * @return $this
# *
# * @throws \InvalidArgumentException'
- name: dontReport
visibility: public
parameters:
- name: exceptions
comment: '# * Indicate that the given exception type should not be reported.
# *
# * Alias of "ignore".
# *
# * @param array|string $exceptions
# * @return $this'
- name: ignore
visibility: public
parameters:
- name: exceptions
comment: '# * Indicate that the given exception type should not be reported.
# *
# * @param array|string $exceptions
# * @return $this'
- name: dontFlash
visibility: public
parameters:
- name: attributes
comment: '# * Indicate that the given attributes should never be flashed to the
session on validation errors.
# *
# * @param array|string $attributes
# * @return $this'
- name: level
visibility: public
parameters:
- name: type
- name: level
comment: '# * Set the log level for the given exception type.
# *
# * @param class-string<\Throwable> $type
# * @param \Psr\Log\LogLevel::* $level
# * @return $this'
- name: report
visibility: public
parameters:
- name: e
comment: '# * Report or log an exception.
# *
# * @param \Throwable $e
# * @return void
# *
# * @throws \Throwable'
- name: reportThrowable
visibility: protected
parameters:
- name: e
comment: '# * Reports error based on report method on exception or to logger.
# *
# * @param \Throwable $e
# * @return void
# *
# * @throws \Throwable'
- name: shouldReport
visibility: public
parameters:
- name: e
comment: '# * Determine if the exception should be reported.
# *
# * @param \Throwable $e
# * @return bool'
- name: shouldntReport
visibility: protected
parameters:
- name: e
comment: '# * Determine if the exception is in the "do not report" list.
# *
# * @param \Throwable $e
# * @return bool'
- name: throttle
visibility: protected
parameters:
- name: e
comment: '# * Throttle the given exception.
# *
# * @param \Throwable $e
# * @return \Illuminate\Support\Lottery|\Illuminate\Cache\RateLimiting\Limit|null'
- name: throttleUsing
visibility: public
parameters:
- name: throttleUsing
comment: '# * Specify the callback that should be used to throttle reportable exceptions.
# *
# * @param callable $throttleUsing
# * @return $this'
- name: stopIgnoring
visibility: public
parameters:
- name: exceptions
comment: '# * Remove the given exception class from the list of exceptions that
should be ignored.
# *
# * @param array|string $exceptions
# * @return $this'
- name: buildExceptionContext
visibility: protected
parameters:
- name: e
comment: '# * Create the context array for logging the given exception.
# *
# * @param \Throwable $e
# * @return array'
- name: exceptionContext
visibility: protected
parameters:
- name: e
comment: '# * Get the default exception context variables for logging.
# *
# * @param \Throwable $e
# * @return array'
- name: context
visibility: protected
parameters: []
comment: '# * Get the default context variables for logging.
# *
# * @return array'
- name: buildContextUsing
visibility: public
parameters:
- name: contextCallback
comment: '# * Register a closure that should be used to build exception context
data.
# *
# * @param \Closure $contextCallback
# * @return $this'
- name: render
visibility: public
parameters:
- name: request
- name: e
comment: '# * Render an exception into an HTTP response.
# *
# * @param \Illuminate\Http\Request $request
# * @param \Throwable $e
# * @return \Symfony\Component\HttpFoundation\Response
# *
# * @throws \Throwable'
- name: finalizeRenderedResponse
visibility: protected
parameters:
- name: request
- name: response
- name: e
comment: '# * Prepare the final, rendered response to be returned to the browser.
# *
# * @param \Illuminate\Http\Request $request
# * @param \Symfony\Component\HttpFoundation\Response $response
# * @param \Throwable $e
# * @return \Symfony\Component\HttpFoundation\Response'
- name: respondUsing
visibility: public
parameters:
- name: callback
comment: '# * Prepare the final, rendered response for an exception using the given
callback.
# *
# * @param callable $callback
# * @return $this'
- name: prepareException
visibility: protected
parameters:
- name: e
comment: '# * Prepare exception for rendering.
# *
# * @param \Throwable $e
# * @return \Throwable'
- name: mapException
visibility: protected
parameters:
- name: e
comment: '# * Map the exception using a registered mapper if possible.
# *
# * @param \Throwable $e
# * @return \Throwable'
- name: renderViaCallbacks
visibility: protected
parameters:
- name: request
- name: e
comment: '# * Try to render a response from request and exception via render callbacks.
# *
# * @param \Illuminate\Http\Request $request
# * @param \Throwable $e
# * @return mixed
# *
# * @throws \ReflectionException'
- name: renderExceptionResponse
visibility: protected
parameters:
- name: request
- name: e
comment: '# * Render a default exception response if any.
# *
# * @param \Illuminate\Http\Request $request
# * @param \Throwable $e
# * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse'
- name: unauthenticated
visibility: protected
parameters:
- name: request
- name: exception
comment: '# * Convert an authentication exception into a response.
# *
# * @param \Illuminate\Http\Request $request
# * @param \Illuminate\Auth\AuthenticationException $exception
# * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse'
- name: convertValidationExceptionToResponse
visibility: protected
parameters:
- name: e
- name: request
comment: '# * Create a response object from the given validation exception.
# *
# * @param \Illuminate\Validation\ValidationException $e
# * @param \Illuminate\Http\Request $request
# * @return \Symfony\Component\HttpFoundation\Response'
- name: invalid
visibility: protected
parameters:
- name: request
- name: exception
comment: '# * Convert a validation exception into a response.
# *
# * @param \Illuminate\Http\Request $request
# * @param \Illuminate\Validation\ValidationException $exception
# * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse'
- name: invalidJson
visibility: protected
parameters:
- name: request
- name: exception
comment: '# * Convert a validation exception into a JSON response.
# *
# * @param \Illuminate\Http\Request $request
# * @param \Illuminate\Validation\ValidationException $exception
# * @return \Illuminate\Http\JsonResponse'
- name: shouldReturnJson
visibility: protected
parameters:
- name: request
- name: e
comment: '# * Determine if the exception handler response should be JSON.
# *
# * @param \Illuminate\Http\Request $request
# * @param \Throwable $e
# * @return bool'
- name: shouldRenderJsonWhen
visibility: public
parameters:
- name: callback
comment: '# * Register the callable that determines if the exception handler response
should be JSON.
# *
# * @param callable(\Illuminate\Http\Request $request, \Throwable): bool $callback
# * @return $this'
- name: prepareResponse
visibility: protected
parameters:
- name: request
- name: e
comment: '# * Prepare a response for the given exception.
# *
# * @param \Illuminate\Http\Request $request
# * @param \Throwable $e
# * @return \Illuminate\Http\Response|\Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse'
- name: convertExceptionToResponse
visibility: protected
parameters:
- name: e
comment: '# * Create a Symfony response for the given exception.
# *
# * @param \Throwable $e
# * @return \Symfony\Component\HttpFoundation\Response'
- name: renderExceptionContent
visibility: protected
parameters:
- name: e
comment: '# * Get the response content for the given exception.
# *
# * @param \Throwable $e
# * @return string'
- name: renderExceptionWithCustomRenderer
visibility: protected
parameters:
- name: e
comment: '# * Render an exception to a string using the registered `ExceptionRenderer`.
# *
# * @param \Throwable $e
# * @return string'
- name: renderExceptionWithSymfony
visibility: protected
parameters:
- name: e
- name: debug
comment: '# * Render an exception to a string using Symfony.
# *
# * @param \Throwable $e
# * @param bool $debug
# * @return string'
- name: renderHttpException
visibility: protected
parameters:
- name: e
comment: '# * Render the given HttpException.
# *
# * @param \Symfony\Component\HttpKernel\Exception\HttpExceptionInterface $e
# * @return \Symfony\Component\HttpFoundation\Response'
- name: registerErrorViewPaths
visibility: protected
parameters: []
comment: '# * Register the error template hint paths.
# *
# * @return void'
- name: getHttpExceptionView
visibility: protected
parameters:
- name: e
comment: '# * Get the view used to render HTTP exceptions.
# *
# * @param \Symfony\Component\HttpKernel\Exception\HttpExceptionInterface $e
# * @return string|null'
- name: toIlluminateResponse
visibility: protected
parameters:
- name: response
- name: e
comment: '# * Map the given exception into an Illuminate response.
# *
# * @param \Symfony\Component\HttpFoundation\Response $response
# * @param \Throwable $e
# * @return \Illuminate\Http\Response|\Illuminate\Http\RedirectResponse'
- name: prepareJsonResponse
visibility: protected
parameters:
- name: request
- name: e
comment: '# * Prepare a JSON response for the given exception.
# *
# * @param \Illuminate\Http\Request $request
# * @param \Throwable $e
# * @return \Illuminate\Http\JsonResponse'
- name: convertExceptionToArray
visibility: protected
parameters:
- name: e
comment: '# * Convert the given exception to an array.
# *
# * @param \Throwable $e
# * @return array'
- name: renderForConsole
visibility: public
parameters:
- name: output
- name: e
comment: '# * Render an exception to the console.
# *
# * @param \Symfony\Component\Console\Output\OutputInterface $output
# * @param \Throwable $e
# * @return void
# *
# * @internal This method is not meant to be used or overwritten outside the framework.'
- name: dontReportDuplicates
visibility: public
parameters: []
comment: '# * Do not report duplicate exceptions.
# *
# * @return $this'
- name: isHttpException
visibility: protected
parameters:
- name: e
comment: '# * Determine if the given exception is an HTTP exception.
# *
# * @param \Throwable $e
# * @return bool'
- name: newLogger
visibility: protected
parameters: []
comment: '# * Create a new logger instance.
# *
# * @return \Psr\Log\LoggerInterface'
traits:
- Closure
- Exception
- Illuminate\Auth\Access\AuthorizationException
- Illuminate\Auth\AuthenticationException
- Illuminate\Cache\RateLimiter
- Illuminate\Cache\RateLimiting\Limit
- Illuminate\Cache\RateLimiting\Unlimited
- Illuminate\Console\View\Components\BulletList
- Illuminate\Console\View\Components\Error
- Illuminate\Contracts\Container\Container
- Illuminate\Contracts\Foundation\ExceptionRenderer
- Illuminate\Contracts\Support\Responsable
- Illuminate\Database\Eloquent\ModelNotFoundException
- Illuminate\Database\MultipleRecordsFoundException
- Illuminate\Database\RecordsNotFoundException
- Illuminate\Foundation\Exceptions\Renderer\Renderer
- Illuminate\Http\Exceptions\HttpResponseException
- Illuminate\Http\JsonResponse
- Illuminate\Http\RedirectResponse
- Illuminate\Http\Response
- Illuminate\Routing\Exceptions\BackedEnumCaseNotFoundException
- Illuminate\Routing\Router
- Illuminate\Session\TokenMismatchException
- Illuminate\Support\Arr
- Illuminate\Support\Facades\Auth
- Illuminate\Support\Lottery
- Illuminate\Support\Reflector
- Illuminate\Support\Traits\ReflectsClosures
- Illuminate\Support\ViewErrorBag
- Illuminate\Validation\ValidationException
- InvalidArgumentException
- Psr\Log\LoggerInterface
- Psr\Log\LogLevel
- Symfony\Component\Console\Exception\CommandNotFoundException
- Symfony\Component\ErrorHandler\ErrorRenderer\HtmlErrorRenderer
- Symfony\Component\HttpFoundation\Exception\RequestExceptionInterface
- Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
- Symfony\Component\HttpKernel\Exception\BadRequestHttpException
- Symfony\Component\HttpKernel\Exception\HttpException
- Symfony\Component\HttpKernel\Exception\HttpExceptionInterface
- Symfony\Component\HttpKernel\Exception\NotFoundHttpException
- Throwable
- WeakMap
- ReflectsClosures
interfaces:
- ExceptionHandlerContract