ExceptionHandler

Displays the custom error page when an uncaught exception occurs.

since

3.0

package

Joomla CMS

Methods

handleException

Handles exceptions: logs errors and renders error page.

handleException(\Exception|\Throwable error) : 
static
since

3.10.0

Arguments

error

Exception|ThrowableAn Exception or Throwable (PHP 7+) object for which to render the error page.

Response

void

handleUserDeprecatedErrors

Handles an error triggered with the E_USER_DEPRECATED level.

handleUserDeprecatedErrors( errorNumber,  errorMessage,  errorFile,  errorLine) : 
static
since

4.0.0

Arguments

errorNumber

intThe level of the raised error, represented by the E_* constants.

errorMessage

stringThe error message.

errorFile

stringThe file the error was triggered from.

errorLine

intThe line number the error was triggered from.

Response

bool

isException

Checks if given error belong to PHP exception class (\Throwable for PHP 7+, \Exception for PHP 5-).

isException( error) : 
static
since

3.10.0

Arguments

error

mixedAny error value.

Response

bool

logException

Logs exception, catching all possible errors during logging.

logException(\Throwable error) : 
static
since

3.10.0

Arguments

error

ThrowableAn Exception or Throwable (PHP 7+) object to get error message from.

Response

void

render

Render the error page based on an exception.

render(\Throwable error) : 
static
since

3.0

Arguments

error

ThrowableAn Exception or Throwable (PHP 7+) object for which to render the error page.

Response

void