|
Yaf_Dispatcher::catchExceptionSwitch on/off exception catching Beschreibung
public Yaf_Dispatcher Yaf_Dispatcher::catchException
([ bool
$flag
] )While the application.dispatcher.throwException is On(you can also calling to Yaf_Dispatcher::throwException(TRUE) to enable it), Yaf will throw Exception whe error occurrs instead of trigger error. then if you enable Yaf_Dispatcher::catchException(also can enabled by set application.dispatcher.catchException), all uncaught Exceptions will be caught by ErrorController::error if you have defined one. Parameter-Liste
Rückgabewerte
BeispieleBeispiel #1 Yaf_Dispatcher::catchExceptionexample
/* if you defined a ErrorController like following */Das oben gezeigte Beispiel erzeugt eine ähnliche Ausgabe wie: /* now if some error occur, assuming access a non-exists controller(or you can throw a exception yourself): */ 404:Could not find controller script **/application/controllers/No-exists-controller.php Siehe auch
|