ExceptionHandler
in package
This is the ExceptionHandler class.
The purpose of this class is to manage exceptions.
Tags
Table of Contents
__construct() | Constructor. | : mixed |
---|---|---|
error() | This method generates a log of the error, outputs it only in DEVEL mode, and returns a string indicating "ERROR" if $nestedError is null or "NestedError" otherwise. | : string |
errorDumper() | This method returns an string with the dump of the Throwable element given by parameter. | : string |
runException() | This method runs the exception management. | : string |
Methods
__construct()
Constructor.
public
__construct(Throwable $e) : mixed
Parameters
- $e : Throwable
-
Exception to manage.
Return values
mixed —error()
This method generates a log of the error, outputs it only in DEVEL mode, and returns a string indicating "ERROR" if $nestedError is null or "NestedError" otherwise.
public
error([ $nestedError = null ]) : string
Parameters
Return values
string —errorDumper()
This method returns an string with the dump of the Throwable element given by parameter.
public
static errorDumper(Throwable $e) : string
Parameters
- $e : Throwable
Return values
string —runException()
This method runs the exception management.
public
runException([string $type = 'undefined' ][, bool $staticRedirect = false ]) : string
- It saves a log of the error.
- It outputs the error.
-If staticRedirect is true then it outputs an static 503 error output calling to FWK\Core\Exceptions\ErrorWithoutController.php
-If staticRedirect is false then it enroutes the request to error controller and executes it.
This method also returns an string indicating 'Request uncompleted ' concatenated with the type pased by parameter.
Parameters
- $type : string = 'undefined'
- $staticRedirect : bool = false