Catching framework initialization errors

Wondering the best approach to take here to catch errors caused by
framework initialization issues.

Here's the situation.

I have a running copy of ColdBox 2.6.1 and my app is running along
just dandy. Without restarting CF, I replace my Coldbox system
directory with that of ColdBox 2.6.3. Next step? Restart CF to load
the new stuff into memory.

But before I do, people start getting the nasty error on their screen:

Oops! Exception Encountered
Framework Initialization/Configuration Exception
Error Type: Framework.SettingNotFoundException : [N/A]
Error Messages: The setting IOCFrameworkReload does not exist.
FWSetting flag is false

In my app's config\coldbox.xml.cfm, I have the CustomErrorTemplate
defined, but it isnt using it. This is the standard, ugly dump of

What approach should I take to try to catch these and hanldle them?
Something in the coldbox.cfc I should edit?

Place a try/catch around the call to coldbox in your Application.cfc.


A try/catch in my application.cfc won't catch this. In the example I
described, my application.cfc calls reloadCheck() in the
onRequestStart method. reloadChecks() has its own try/catch logic,
which is why it is not thrown up the chain to my application.cfc to

So before I go and add in all this extra code to coldbox.cfc, I wanted
to see what a "recommended" approach would be -- ideally, it would use
the customErrorTemplate Ive already defined instead of the one it
currently uses.


Well, for better or worse, I decided to edit the core

In the renderBugReport method, there was this logic:

if Exception.getErrortype() eq "application" and controller.getSetting
("CustomErrorTemplate") neq ""
   try to use the customErrorTemplate

   use the standard BugReport.cfm

So I removed the IF condition -- saying try to use the
customErrorTemplate if it exists in all cases.

That did the trick -- now in the situation I described users see my
error template not the standard Coldbox error template.



I had a similar desire to display a more elegant message for a
different framework error as described in the link below. I also found
no other option as of v2.6.3 but to modify the framework along the
same lines.

- Gabriel

Hi guys,

this has been logged in as a bug and hopefully fixed soon.

If you guys have the solution already, please post it and also please post other alternatives if you see fit.


Hi Luis,

I'll let Tim give specifics as our needs were different and his error
seems fresh and reproducible. My post is 3 months old and a lot of
code has changed since then.

I chimed in mostly to let him know that he was not alone in
experiencing a case where an error could not be handled elegantly. I
find some comfort in knowing that others have experienced a similar
problem even if no solution is available.

- Gabriel

What I did in our case is this:

In the renderBugReport method, there was this logic:

<cfif Exception.getErrortype() eq "application" and
controller.getSetting("CustomErrorTemplate") neq "">
   try to use the customErrorTemplate

   use the standard BugReport.cfm

I removed the conditional logic so it always tries to use the