Error
        
        extends Exception
    
    
            
            in package
            
        
    
    
    
Class \Hoa\Exception\Error.
This exception is the equivalent representation of PHP errors.
Tags
Table of Contents
Properties
- $_arguments : array<string|int, mixed>
- Arguments to format message.
- $_previous : Exception
- Previous.
- $_rawMessage : string
- Original message.
- $_tmpArguments : array<string|int, mixed>
- Delay processing on arguments.
- $_trace : array<string|int, mixed>
- Backtrace.
Methods
- __construct() : mixed
- Constructor.
- __toString() : string
- String representation of object.
- enableErrorHandler() : mixed
- Enable error handler: Transform PHP error into `\Hoa\Exception\Error`.
- enableUncaughtHandler() : mixed
- Enable uncaught exception handler.
- getArguments() : array<string|int, mixed>
- Get arguments for the message.
- getBacktrace() : array<string|int, mixed>
- Get the backtrace.
- getFormattedMessage() : string
- Get the message already formatted.
- getFrom() : string
- Get the source of the exception (class, method, function, main etc.).
- getPreviousThrow() : Exception
- Get previous.
- getRawMessage() : string
- Get the raw message.
- raise() : string
- Raise an exception as a string.
- send() : void
- Send the exception on hoa://Event/Exception.
- uncaught() : void
- Catch uncaught exception (only \Hoa\Exception\Idle and children).
Properties
$_arguments
Arguments to format message.
    protected
        array<string|int, mixed>
    $_arguments
     = null
    
    
    
    
$_previous
Previous.
    protected
        Exception
    $_previous
     = null
    
    
    
    
$_rawMessage
Original message.
    protected
        string
    $_rawMessage
     = null
    
    
    
    
$_tmpArguments
Delay processing on arguments.
    protected
        array<string|int, mixed>
    $_tmpArguments
     = null
    
    
    
    
$_trace
Backtrace.
    protected
        array<string|int, mixed>
    $_trace
     = null
    
    
    
    
Methods
__construct()
Constructor.
    public
                    __construct(string $message, int $code, string $file, int $line[, array<string|int, mixed> $trace = [] ]) : mixed
    Parameters
- $message : string
- 
                    Message. 
- $code : int
- 
                    Code (the ID). 
- $file : string
- 
                    File. 
- $line : int
- 
                    Line. 
- $trace : array<string|int, mixed> = []
- 
                    Trace. 
__toString()
String representation of object.
    public
                    __toString() : string
    Return values
stringenableErrorHandler()
Enable error handler: Transform PHP error into `\Hoa\Exception\Error`.
    public
            static        enableErrorHandler([bool $enable = true ]) : mixed
    Parameters
- $enable : bool = true
- 
                    Enable. 
enableUncaughtHandler()
Enable uncaught exception handler.
    public
            static        enableUncaughtHandler([bool $enable = true ]) : mixed
    This is restricted to Hoa's exceptions only.
Parameters
- $enable : bool = true
- 
                    Enable. 
getArguments()
Get arguments for the message.
    public
                    getArguments() : array<string|int, mixed>
    Return values
array<string|int, mixed>getBacktrace()
Get the backtrace.
    public
                    getBacktrace() : array<string|int, mixed>
    Do not use \Exception::getTrace() any more.
Return values
array<string|int, mixed>getFormattedMessage()
Get the message already formatted.
    public
                    getFormattedMessage() : string
    Return values
stringgetFrom()
Get the source of the exception (class, method, function, main etc.).
    public
                    getFrom() : string
    Return values
stringgetPreviousThrow()
Get previous.
    public
                    getPreviousThrow() : Exception
    Do not use \Exception::getPrevious() any more.
Return values
ExceptiongetRawMessage()
Get the raw message.
    public
                    getRawMessage() : string
    Return values
stringraise()
Raise an exception as a string.
    public
                    raise([bool $previous = false ]) : string
    Parameters
- $previous : bool = false
- 
                    Whether raise previous exception if exists. 
Return values
stringsend()
Send the exception on hoa://Event/Exception.
    public
                    send() : void
    uncaught()
Catch uncaught exception (only \Hoa\Exception\Idle and children).
    public
            static        uncaught(Throwable $exception) : void
    Parameters
- $exception : Throwable
- 
                    The exception.