Friday, June 13, 2008

coldfusion.runtime.AbortException

Most of the time when I'm working, I like to have CF hit me with as much debugging information as possible.  I'm familiar with it enough now that I know what to ignore generally. 

Back in the days of cf7 ;) there was a little problem with CF throwing an error on every cflocation tag it hit if you had implemented the OnError method in your Application.cfc file.  It has since been corrected, but the underlying technology that deals with cflocation must still trigger that error somewhere in the bowels of cfs java code.

If you are working in cfeclipse and using the line debugger, there is an option under preferences | ColdFusion | debug settings that lets you break on a CFML runtime error.  Turning this on means that instead of getting the big CF error page with all of its debugging goodness, your code will halt execution and you can see where exactly in your code the error was first determined.  Occasionally this can be helpful, especially if something is confusing cf about the location of your error. 

Unfortunately, with this on, CF still thinks of cflocation as an error.  For all I know, it technically may be because of how cflocation has been implmented.  Hey, if we're allowed to trap an error sometimes, so should the people that wrote our language.

If you want to try a workaround in your code, Ray Camden has a post on his blog with some code.  For what I'm doing, it's probably best just to leave the thing off and deal with runtime errors in the resulting page in the browser instead of trapping them by default.

No comments:

Post a Comment