Hmm..then I don't seem to using the intercept point correctly.
I'm trying to catch exceptions in an interceptor. This is my most basic form:
<cffunction name="onException" access="public" returntype="void"
hint="Executes whenever the framework detects an exception "
output="false" >
<cfargument name="event" required="true" type="any" hint="The
event object : coldbox.system.beans.requestContext">
<cfargument name="interceptData" required="true" type="struct"
hint="A structure containing intercepted information. NONE BY DEFAULT
HERE">
<cfscript>
variables.logger.error("An error occurred");
</cfscript>
</cffunction>
I know that the interceptor is registered correctly because my custom
intercept point is working. It is my understanding that I don't need
to announce this one because onException is a built in point. So I
should, I believe, just be able to define an onException method in my
intercept and it will get added to the list of things that listen for
exceptions, correct?
I do not have custom error handling defined in my app, so if I have an
error somewhere, I'd expect the framework to log the error and then
also see an additional error logged from my intercept that says "An
error occurred". Is that correct?
Currently, when I induce an error in my code by saying "foo = ;" in a
handler method somewhere, I see the exception logged by the framework
in my log file but nothing seems to be happening inside the
onException method I defined.
Also, what data should I have access to in this method? Is it the
cferror struct thrown by Coldfusion? Or is it an exception bean
created by Coldbox?
Thanks,
Judah