PHP Class core\Error

Inheritance: extends core\Exception
显示文件 Open project: sendya/shadowsocks-panel Class Usage Examples

Public Methods

Method Description
__construct ( string $message = 'Internal Server Error', integer $code, Throwable $previous = null, array $trace = [] ) Create a Exception
formatBackTrace ( ) : string Format backtrace information
handlePHPError ( $errNo, $errStr, $errFile, $errLine )
handleUncaughtException ( Throwable $instance )
registerHandler ( ) Register custom handler for uncaught exception and errors

Method Details

__construct() public method

Create a Exception
public __construct ( string $message = 'Internal Server Error', integer $code, Throwable $previous = null, array $trace = [] )
$message string Error message
$code integer Error code
$previous Throwable Previous exception
$trace array Backtrace information

formatBackTrace() public method

Format backtrace information
public formatBackTrace ( ) : string
return string Formatted backtrace information

handlePHPError() public static method

public static handlePHPError ( $errNo, $errStr, $errFile, $errLine )

handleUncaughtException() public static method

public static handleUncaughtException ( Throwable $instance )
$instance Throwable Exception or Error instance

registerHandler() public static method

Register custom handler for uncaught exception and errors
public static registerHandler ( )