PHP » GoLang |
login |
register |
about
|
GoLang Yaf_Dispatcher::catchException
request it (357)
GoLang replacement for PHP's Yaf_Dispatcher::catchException
[edit | history]
PHP Yaf_Dispatcher::catchExceptionPHP original manual for Yaf_Dispatcher::catchException [ show | php.net ]Yaf_Dispatcher::catchException(Yaf >=1.0.0) Yaf_Dispatcher::catchException — Switch on/off exception catching DescriptionWhile 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. Parameters
Return Values
ExamplesExample #1 Yaf_Dispatcher::catchException()example
/* if you defined a ErrorController like following */ The above example will output something similar to: /* 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 See Also
|
more
Recently updated
more
Most requested
more
Last requests
|