views:

71

answers:

3

I want find out as much as I can about any error that occurs on my ColdFusion page. Then, I want to save the information in a database. I am attempting to find a list of all the different properties contained in the exception object (which is a parameter of the OnError method), and I can't seem to find an exhaustive list. The list on the Adobe site doesn't seem to have the same properties as my cfDump of the exception variable. Any suggestions as to where I can find a list?

+1  A: 

Here is my suggestion: bookmark this page (and this one too) and you'll be happy.

Just to make the answer exact, here is the direct link to the cfcatch page, this data you can grab from the arguments.exception.cause structure.

Sergii
Thanks for your answer. However, the cfcatch page doesn't list the stack trace, which shows up in my cfdump.
dmr
+4  A: 

Take a look at Ray Camden's article on adding error handling: http://www.coldfusionjedi.com/index.cfm/2007/12/5/The-Complete-Guide-to-Adding-Error-Handling-to-Your-ColdFusion-Application

Also have a look at the error handling pages in the ColdFusion livedocs. The variables available under onerror and cfcatch vary depending on the error that occurs, so you'll need to allow for these differences. The differences are very well documented in the livedocs under the cfml reference and developer guide.

Stephen Moretti
+1 since i used the same guide which in the end helped me resolve several bugs.
Ahmad
+1  A: 

If you want to handle exceptions and store them in an easy to find / review place then HopToad is pretty cool. The CFC plugin for HopToad is at:

http://github.com/shayne/coldfusion-hoptoad-notifier

HopToad is great to keep track of the errors and the interface is pretty good. Or you can just build your own [HopToad like service]

Cody Caughlan