dumping cfcatch - UndefinedElementException
We have a global error handler that writes the errors to a log file. For some of the entries everything is good, and it dumps all the variables properly (the full stack trace, including the line numbers of where the error occurred.). However for some of the elements all I'm getting is the error below. I'm just dumping #cfcatch#. Why is it different in this case and how do I get the template and line numbers? Russ object of coldfusion.runtime.UndefinedElementException Methods getMessage (returns java.lang.String) getResolvedname (returns java.lang.String) getErrNumber (returns int) getLocalizedMessage (returns java.lang.String) getType (returns java.lang.String) getString (returns java.lang.String) getRootCause (returns java.lang.Throwable) setLocale (returns void) findThrowableTarget (returns int) findAdvancedCFTarget (returns int) findCustomTarget (returns int) unwrap (returns java.lang.Throwable) getDetail (returns java.lang.String) printStackTrace (returns void) printStackTrace (returns void) printStackTrace (returns void) fillInStackTrace (returns java.lang.Throwable) toString (returns java.lang.String) initCause (returns java.lang.Throwable) getCause (returns java.lang.Throwable) getStackTrace (returns [Ljava.lang.StackTraceElement;) setStackTrace (returns void) hashCode (returns int) getClass (returns java.lang.Class) wait (returns void) wait (returns void) wait (returns void) equals (returns boolean) notify (returns void) notifyAll (returns void) objectType class java.lang.Class container class java.lang.Object element NAME ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210822 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54
Re: dumping cfcatch - UndefinedElementException
> We have a global error handler that writes the errors > to a log file. For some of the entries everything is > good, and it dumps all the variables properly (the > full stack trace, including the line numbers of where > the error occurred.). However for some of the > elements all I'm getting is the error below. I'm just > dumping #cfcatch#. Why is it different in this case > and how do I get the template and line numbers? Even with CF7, cfcatch objects still frequently don't function as expected... The best answer I've been able to come up with is this: function getError(err) { var err2 = structnew(); structappend(err2,err,true); if (structkeyexists(err,"rootCause")) { err2.rootCause = getError(err.rootCause); } return err2; } And then dump or otherwise use the result of getError() as you normally would the cfcatch object... I had a problem recently with cfcatch where produced the error "the required argument x was not provided" but changing it to argumentcollection="#getError(cfcatch)#" produced the expected behavior. No guarantees this will resolve your issue, but I figured it might be germane (or maybe Janet). :) s. isaac dealey 954.522.6080 new epoch : isn't it time for a change? add features without fixtures with the onTap open source framework http://www.fusiontap.com http://coldfusion.sys-con.com/author/4806Dealey.htm ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:210828 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54