CHAPTER 7 – PEAR Error Modes – PEAR_ERROR_TRIGGER

The trigger mode passes the error message on to PHP's built-in trigger_error() function. This mode also takes an optional parameter which is the PHP error level used in the trigger_error() call (one of E_USER_NOTICE, E_USER_WARNING and E_USER_ERROR). Wrapping PHP errors inside PEAR errors may be useful, for example, if you want to exploit the flexibility of PEAR errors but all the different built-in logging capabilities of PHP's own error handling.

Post Comment
Login to post comments