|
Yaf_Dispatcher::catchExceptionSwitch on/off exception catching Description
public Yaf_Dispatcherbool Yaf_Dispatcher::catchException(boolnull
$flag = null)While application.dispatcher.throwException is on (which can also be enabled by calling Yaf_Dispatcher::throwException), Yaf throws exceptions when errors occur instead of triggering errors.
If exception catching is additionally enabled via this method (or via
application.dispatcher.catchException),
all uncaught exceptions are caught and dispatched to
Parameters
Return Values
Returns the Yaf_Dispatcher object itself when
ExamplesExample #1 Yaf_Dispatcher::catchException example The above example will output something similar to: /* now if some error occurs, assuming accessing a non-existent controller (or you can throw an exception yourself): */ 404:Could not find controller script **/application/controllers/No-exists-controller.php See Also
|