Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
sdwebguy99 #1
application.cfc and onError function
I have a newly built application.cfc that includes an onError function. As some
have figured out, the onError function is run whenever there is a CFLOCATION or
CFABORT in the application's code. A search on these forums found nothing, but
a search on Google found this:
onError: When using the onError method, every single <cflocation> call will
fire the event. Kind of a silly bug, but it didn't get found till too late.
Christian Cantrell came up with a nice work around to place inside your
onError:
<cfif arguments.exception.rootCause eq "coldfusion.runtime.AbortException">
<cfreturn/>
</cfif>
However, when I add this, I get an error that says rootCause is not defined in
the exception. In fact, the only thing that is defined is the TagContext.
Anyone have any ideas to prevent these CFLOCATION and CFABORT tags from
triggering the onError function?
sdwebguy99 Guest
-
how to create search function in flash application
:confused;:embarrassment; -
MX7: Can CFC's use a function in Application.cfm?
Version CF7 and cf6.1 if possible.... I have built a function inside my Application.cfm file. (a basic error messae with output) I can use said... -
dllimport call in aspnet application makes the application hangs
As our application design requires us to use one of the validation API engine which was written on C(so basically all I have is a dll) and I tested... -
Flash MX 2004 Prof - Form application function call question
I have a flashmx 2004 professional application using forms. I am able to call methods on my application form from child forms with no problem. ... -
Shared library / Mach-O: Application crashs if I call a function
Hi, me again Meanwhile, I can load the shared library in my Mach-O Application and I found my function (BeepTwice) in it. But if I try to call... -
sdwebguy99 #2
Re: application.cfc and onError function
I am using CFMX7 with hotfix2. I found a solution: it looks like the sample
code posted will not work. The new sample code below is the real solution--it
will prevent CFLOCATION from triggering the onError method code.
<!--- Prevent CFLOCATION and CFABORT from triggering these errors --->
<cfif StructKeyExists(arguments.exception,"type") and arguments.exception.type
eq "coldfusion.runtime.AbortException">
<cfreturn/>
</cfif>
sdwebguy99 Guest
-
Erick_Rod #3
Re: application.cfc and onError function
well, i find a better way for cfabort or cflocation...
use below of the include or location and replace <cfabort> for
<cfreturn false>
No more code XD
Erick_Rod Guest



Reply With Quote

