PEAR_Error constructor
PEAR_Error
PEAR_Error
([string $message = 'unknown error'], [int $code = null], [int $mode = null], [mixed $options = null], [string $userinfo = null])
-
string
$message: message
-
int
$code: (optional) error code
-
int
$mode: (optional) error mode, one of: PEAR_ERROR_RETURN, PEAR_ERROR_PRINT, PEAR_ERROR_DIE, PEAR_ERROR_TRIGGER, PEAR_ERROR_CALLBACK or PEAR_ERROR_EXCEPTION
-
mixed
$options: (optional) error level, _OR_ in the case of PEAR_ERROR_CALLBACK, the callback function or object/method tuple.
-
string
$userinfo: (optional) additional user/debug info
void
addUserInfo
( $info)
Get the call backtrace from where the error was generated.
Supported with PHP 4.3.0 or newer.
array
getBacktrace
([int $frame = null])
-
int
$frame: (optional) what frame to fetch
Get the callback function/method from an error object.
mixed
getCallback
()
Get error code from an error object
int
getCode
()
Get additional debug information supplied by the application.
string
getDebugInfo
()
Get the error message from an error object.
string
getMessage
()
Get the error mode from an error object.
int
getMode
()
Get the name of this error/exception.
string
getType
()
Get additional user-supplied information.
string
getUserInfo
()
Make a string representation of this object.
string
toString
()