First off, I am fairly new to ColdBox, so pardon my stupidity!
Just as an FYI, I am running CB 2.6 with ColdFusion 9 on Windows.
I am attempting to impliment database error logging for an application
I am working on. In previous systems, not using ColdBox, I have used a
try/catch that, depending on the type of error, would either log it to
database, or skip logging. Ultimately, the purpose was the fact that
some errors might be due to business rule violations, and some might
be code/environment problems.
Expanding a bit on the above, by way of example in the realm of "how
we've done it before", the following is the behavior I am trying to
impliment, using onException:
* User attempts to login via a form
* Form action submitted to event public.login
* Handler creates CustomerService which performs database logic to
check username/password. If login is not valid, throw(type="custom",
message="Login failed. Username or password is invalid) is issued.
* Error is trapped (preferred by onException). Since this is an
"expected" condition, I simply want to insert the exceptionBean into
the request context, and redisplay the form. The view would see the
exceptionBean, and decorate the page with the error information.
The problem I am running into is that (a) I always get the default
error page and (b) running through the debugger (CF Builder), I never
see the onException method invoked.
I figure I'm either missing something very basic, or the way I'm
trying to wire this is just wrong.
Criticism and/or pointers accepted. The path to competency is