I was having some issues in development with error dumps not giving me
complete information. Sometimes it's fine, and other times (presumably
due to *where* the error is thrown) it's not. I can try/catch/dump my
own errors obviously, but it's convenient to use the built in error
handler in development. I tracked it down to this:
In Controller.cfc at line 629 there is a line like so:
this is obviously a workaround for CF's lack of a script-based
rethrow. It has some serious limitations/drawbacks, however.
Depending on what the error is and where it's thrown, I'm getting a
stack trace that tracks back only as far as Util.cfc, which doesn't
at all tell me where the error actually originated.
For example, for this sort of error (trying to access something in PRC
that doesn't exist from inside a handler) it *should* throw this:
Error Type: RequestContext.ValueNotFound : [N/A]
... with a stack trace back to the handler responsible
What I actually get is
Error Type: application : [N/A]
... with a stack trace that's 4 elements long (Util, Controller,
Under Railo this is nice and easy - just replace rethrowit(e) with
"rethrow" and everything works fine and dandy. ACF(8) naturally
buggers this up since rethrow isn't supported in cfscript. I think
this has something to do with what the contents of the cfcatch was at
the time it was passed to rethrowit. For example, sometimes exceptions
contain "rootcause" and sometimes they don't... Either way, the only
way to fix it properly is to use <cftry><cfrethrow> tags instead of
Aesthetically it's not as nice, but it does work a lot better.
I've submitted a the modified controller.cfc to Git. Hope that helps!