TangoException

Extends \Exception

异常

跟原始 Exception 的区别在于有“深度”的概念,以便更及时的判断错误内容 例如 MySQL 报 sql 语句为空,我们更想知道是哪里发送空 sql, 这个位置信息其实是在 trace 的第三行而非第一行

package

Tango

author

Zheng Kai zhengkai@gmail.com

Methods

__construct

__construct(string $sMessage, integer $iDepth, integer $iCode) 
access

public

Arguments

$sMessage

string

报错信息

$iDepth

integer

深度

$iCode

integer

错误代码

Error Handler

errorHandler(integer $iError, string $sMsg, string $sFile, string $sLine) : boolean
static
static
access

public

Arguments

$iError

integer

$sMsg

string

$sFile

string

$sLine

string

Response

boolean

最后错误信息

getLastError() : string
static
static
access

public

Response

string

Exception Handler

handler(\Exception $e, boolean $bSend = TRUE) : string
static
static
access

public

Arguments

$e

\Exception

$bSend

boolean

Response

string

set_error_handler

register() : void
static
static
access

public

Properties

报告深度

_iDepth : 
static

Type(s)

用于显示的报错信息

_sLastError : 
static

Type(s)