cakephp/cakephp — pull request #5252 by markstory (2014-11-25 03:08:22+00:00)
Title: Fix shutdown and afterDispatch events not being fired on exceptions.

When exceptions are fired the shutdown and afterDispatch events should be properly fired. This allows plugins and application code to ensure it is run. Of course this creates the potential for infinite loops if these events also trigger an exception.

Refs #5208