PEAR_Error PEAR_Error(
[string
$message = 'unknown error'], [int
$code = null], [int
$mode = null], [mixed
$options = null], [string
$userinfo = null]
)
|
|
PEAR_Error constructor
Parameters:
|
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 |
API Tags:
void addUserInfo(
$info
)
|
|
Parameters:
array getBacktrace(
[int
$frame = null]
)
|
|
Get the call backtrace from where the error was generated.
Supported with PHP 4.3.0 or newer.
Parameters:
|
int |
$frame: |
(optional) what frame to fetch |
API Tags:
| Return: | Backtrace, or NULL if not available. |
| Access: | public |
Get the callback function/method from an error object.
API Tags:
| Return: | callback function or object/method array |
| Access: | public |
Get error code from an error object
API Tags:
| Return: | error code |
| Access: | public |
Get additional debug information supplied by the application.
API Tags:
| Return: | debug information |
| Access: | public |
Get the error message from an error object.
API Tags:
| Return: | full error message |
| Access: | public |
Get the error mode from an error object.
API Tags:
| Return: | error mode |
| Access: | public |
Get the name of this error/exception.
API Tags:
| Return: | error/exception name (type) |
| Access: | public |
Get additional user-supplied information.
API Tags:
| Return: | user-supplied information |
| Access: | public |
Make a string representation of this object.
API Tags:
| Return: | a string with an object summary |
| Access: | public |