When the errorcontroller plugin catches an error, it seems to recall my other registered plugins (after they have already been called). For example, I have a viewsetup plugin which, on preDispatch, sets up my application view settings (headtitle,headlink,headscript,navigation,etc.). How can I fix this so the errorplugin doesnt recall my other plugins?
When the errorcontroller plugin catches an error, it seems to recall my other registered
Share
You can’t “unring the bell”. By the time the
ErrorHandlerplugin kicks in atpostDispatchanddispatchLoopShutdown, any plugins withrouteStartup,routeShutdown, andpreDispatchhooks have already run.However, if you have specific needs for your views when handling the error condition – like changing the headTitle(), headScript(), layout, navigation, etc – then you can reset them in the
ErrorController.