phpDocumentor

DefaultErrorHandler implements DefaultErrorHandler

Class DefaultErrorHandler

Currently, this error handler is mainly focused on the shop frontend because, there is also another error handler for the admin and therefore, this one is only used in the frontend. At a later point, we should refactor this error handler to handle errors and exceptions for both frontend and backend.

Tags
codeCoverageIgnore

Interfaces, Classes and Traits

DefaultErrorHandler
Class DefaultErrorHandler

Table of Contents

$debugDataProvider  : DebugDataProvider
$environment  : Environment
$loggerBuilder  : LoggerBuilder
$sessionId  : string
$userFriendlyErrorPagesService  : UserFriendlyErrorPageErrorHandlerService
__construct()  : mixed
DefaultErrorHandler constructor.
handleError()  : bool
handleException()  : void
shutdown()  : void
Check for last error and handles it. This needs to be down for some fatal errors like execution time out etc.
logError()  : void
logWarning()  : void
printErrorDetailsOnPage()  : void
redirectToErrorPage()  : void
shouldErrorBeSuppressed()  : bool

Properties

Methods

handleError()

public handleError(int $errorCode, string $errorMessage, string $errorFile, int $errorLine[, array<string|int, mixed> $errorContext = [] ]) : bool
Parameters
$errorCode : int
$errorMessage : string
$errorFile : string
$errorLine : int
$errorContext : array<string|int, mixed> = []
Tags
inheritDoc
Return values
bool

handleException()

public handleException(Throwable $exception) : void
Parameters
$exception : Throwable
Tags
inheritDoc
Return values
void

shutdown()

Check for last error and handles it. This needs to be down for some fatal errors like execution time out etc.

public shutdown() : void
Tags
inheritDoc
Return values
void

logError()

private logError(int $errorCode, string $errorMessage, string $errorFile, int $errorLine, array<string|int, mixed> $errorContext) : void
Parameters
$errorCode : int
$errorMessage : string
$errorFile : string
$errorLine : int
$errorContext : array<string|int, mixed>
Return values
void

logWarning()

private logWarning(int $errorCode, string $errorMessage, string $errorFile, int $errorLine, array<string|int, mixed> $errorContext) : void
Parameters
$errorCode : int
$errorMessage : string
$errorFile : string
$errorLine : int
$errorContext : array<string|int, mixed>
Return values
void

printErrorDetailsOnPage()

private printErrorDetailsOnPage(Throwable $exception) : void
Parameters
$exception : Throwable
Return values
void

shouldErrorBeSuppressed()

private shouldErrorBeSuppressed(string $errorFile, int $errorLine) : bool
Parameters
$errorFile : string
$errorLine : int
Return values
bool

Search results