We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Need best way for catch Exception in View !

Hello. For example Zend Framework include render view into Dispatcher loop, but Phalcon is not.

How can I catch exception from Tag (may be) and redirect for error controller. Any idea ? Thank

As far is I know, the only way to handle an Exception in a view component is to catch it at the application level.

Example



1.7k
edited Aug '15

You may have to use an event listener in JavaScript and send it through Ajax (if already sent to the browser)