An error object has a mode of operation that can be set with one of the following constants:
Just return the object, don't do anything special in PEAR_Error's constructor.
Print the error message in the constructor. The execution is not interrupted.
Use PHP's trigger_error() function to raise an internal error in PHP. The execution is aborted if you have defined your own PHP error handler or if you set the error severity to E_USER_ERROR.
Print the error message and exit. Execution is of course aborted.
Use a callback function or method to handle errors. Execution is aborted.
PEAR_Error constructor. Parameters:
error message, defaults to "unknown error"
error code (optional)
Mode of operation. See the error modes section for details.
If the mode of can have any options specified, use this parameter. Currently the "trigger" and "callback" modes are the only using the options parameter. For trigger mode, this parameter is one of E_USER_NOTICE, E_USER_WARNING or E_USER_ERROR. For callback mode, this parameter should contain either the callback function name (string), or a two-element (object, string) array representing an object and a method name.
HIVE: All information for read only. Please respect copyright! |