ar\error
This module allows you to generate errors or check return values for error codes.
methods
| (bool) | isError | Returns true if the given object is an ar_error, error or PEAR_Error object. |
| (object) | raiseError | Returns a new ar_error object with the given message and code. |
isError
(bool) ar_error::isError($object)
(mixed) |
$object |
The variable to check whether it is an error or not. |
Returns true if $object is an ar_error, error or PEAR_Error object.
raiseError
(object) ar_error::raiseError($message, $code)
(string) |
$message |
The error message. |
(int) |
$code |
The error code. |
Returns an ar_error object with the given message and code. The ar_error object implements the following methods:
(string) getMessage()
Returns the error message.
(int) getCode()
Returns the error code.