Move inclusion of APP bootstrap after initialization of ErrorHandler #552

merged 3 commits into from Mar 11, 2012


None yet
5 participants

tPl0ch commented Mar 8, 2012

I was trying to check dependencies of a plugin in plugin bootstrap (IMO the right place to do this), but since the ErrorHandler is not configured yet, triggering warnings or raising exceptions will break CakePHP's Error handling.

Moving the inclusion of APP bootstrap behind the ErrorHandler initialization would enable to do this kind of checking in plugin bootstrap files.


ADmad commented Mar 8, 2012

Seems reasonable to me, lets see what others have to say.


markstory commented Mar 8, 2012

Seems good to me too.


hiromi2424 commented Mar 8, 2012

The edge case is to change error/exception handling in bootstrap process, calling set_*_handler() manually will be required.
But error/exception in bootstrap must be handled by CakePHP, that shows user friendly messages on developing.
I prefer later one = this patch :)


ADmad commented Mar 9, 2012

Yup, so this patch removes a limitation and with slight extra work one can still modify the error/exception handlers in app's bootstrap as @hiromi2424 mentioned.

@markstory We can merge this in 2.1 itself as it won't affect any existing behavior right?


lorenzo commented Mar 9, 2012

Seems good to me too

tPl0ch commented Mar 9, 2012

I just realized that when an Exception is raised with 'include()' no stack args are set to the trace, which produces warnings in the exception stack trace view element.


Should I add this commit as well to this Pull request?


markstory commented Mar 9, 2012

I think adding that change makes sense tPl0ch

tPl0ch commented Mar 9, 2012

@markstory done :-)

markstory added a commit that referenced this pull request Mar 11, 2012

Merge pull request #552 from tPl0ch/2.1-error-handler-bootstrap
Move inclusion of APP bootstrap after initialization of ErrorHandler

@markstory markstory merged commit f26d24b into cakephp:2.1 Mar 11, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment