CB 3 behavior change in ExceptionService

The ExceptionHandler method in the ExceptionService has been modified
in CB 3 and I wanted to check on the reasoning.

I won't paste in the whole chunk of code since it looks ugly in an E-
mail and you can look it up if you want to.
In previous versions of coldbox, if getSetting("ExceptionHandler") was
found, it was run and the logErrorWithBean(ExceptionBean) bit happened
in an else statement so it only ran if there wasn't already an
exception handler defined by me.

What this allowed me to do in my exception handler was decide if I
wanted to log the error and how it got logged by calling
logger.logErrorWithBean(exceptionBean) myself.

For instance, most of my shopping cart handlers check and see if the
user's shopping cart has expired and throw a special error message if
it has. That way they aren't responsible with dealing with the
ramifications of the situation, they just throw the error. In my
exceptionHandler, I check for the session expired error and redirect
to a "we're sorry your cart has timed out" page WITHOUT logging the
error. For other errors, I choose to log them and not redierct
anywhere which allows the bug report page (on dev) or the call
customer service page (on production) to kick in.

I noticed after deploying CB 3 M4, that all my errors were getting
logged twice, and I was also getting error E-mails for all the expired
sessions. (Which one of our automated processes kicks off by the

I checked the new exceptionService, and the
logErrorWithBean(ExceptionBean) bit has been moved above the
getSetting("ExceptionHandler") if statement so it always runs
regardless of whether or not I have a customer exception handler

I didn't see anything right off in the release notes, so I wanted to
see what the reasoning was for this since I find the behavior
undesirable. I would prefer that if I specify a custom exception
handler, that I would be allowed to decide whether or not to log the



Kinda divided on this one Brad. The behavior I was looking for was to log the error no matter what just incase the exception handler itself was producing errors on its own. So I am divided if it should be this or that? Opinions, comments, suggestions?
Luis F. Majano
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com