Feeling Stupid about onError()

Sometimes I can’t see the forest because all the doggone trees are in the way. Lord willin, that is the case here.

I have implemented the onError() method in the handler for a RESTful service. It works fine, but I am struggling with what the properties are of the “exception” argument that is passed in. Are these documented somewhere. I initially figured it would be the exceptionBean accessors, but that is not the case.

Any help, pointers, etc., would be appreciated!

Kevin S. Anderson

Superlative Solutions, Inc.

ColdBox is currently simply passing a CFCATCH as the exception argument. So, you can simply treat this as a CFCATCH, or, file a bug report.

https://github.com/ColdBox/coldbox-platform/blob/master/system/web/Controller.cfc - Line 623

Thanks.

Aaron Greenlee
http://aarongreenlee.com/

here are the docs for cfcatch http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7ec5.html

There is a lot of information about the error contained in that structure, these 3 will usually give you what you want but check out the docs if you need more.

And, if you are interested in tracking your errors, be sure to try out Hoth: http://aarongreenlee.com/hoth Support is baked in for ColdBox and cfcatch exceptions.

Hi, Dan and Aaron:

Thanks for your responses on this, gentlemen. Shortly after writing the original email, I dumped the exception into the REST response and figured it out. Why I didn’t think of that originally, I don’t know. Guess I just wanted someone to hold my hand

Cheers!

Kevin