PHP Class think\Error

ファイルを表示 Open project: top-think/framework Class Usage Examples

Public Methods

Method Description
appError ( integer $errno, integer $errstr, string $errfile = '', integer $errline, array $errcontext = [] ) Error Handler
appException ( Exception | Throwable $e ) Exception Handler
appShutdown ( ) Shutdown Handler
getExceptionHandler ( ) : Handle Get an instance of the exception handler.
register ( ) : void 注册异常处理

Protected Methods

Method Description
isFatal ( integer $type ) : boolean 确定错误类型是否致命

Method Details

appError() public static method

Error Handler
public static appError ( integer $errno, integer $errstr, string $errfile = '', integer $errline, array $errcontext = [] )
$errno integer 错误编号
$errstr integer 详细错误信息
$errfile string 出错的文件
$errline integer 出错行号
$errcontext array

appException() public static method

Exception Handler
public static appException ( Exception | Throwable $e )
$e Exception | Throwable

appShutdown() public static method

Shutdown Handler
public static appShutdown ( )

getExceptionHandler() public static method

Get an instance of the exception handler.
public static getExceptionHandler ( ) : Handle
return think\exception\Handle

isFatal() protected static method

确定错误类型是否致命
protected static isFatal ( integer $type ) : boolean
$type integer
return boolean

register() public static method

注册异常处理
public static register ( ) : void
return void