Pass CFCATCH to a UDF expecting a structure

When you dump CFCATCH ColdFusion says it’s a structure. But when you try pass it to a UDF that expects a structure you get an error.

So how does CFDUMP treat CFCATCH as a structure and how can we do the same thing? Through duplicate(). When you pass CFCATCH to duplicate() it returns a structure. After that you can pass it to UDF as a structure.


4 thoughts on “Pass CFCATCH to a UDF expecting a structure

  1. A note here: If you get an undefined exception, you’ll ge an object type of “coldfusion.runtime.UndefinedElementException”, which is an object and not a struct. You might want to use the getClass().toString() on all of your errors to test the type of exception you get. Trying to Duplicate() one of these puppies throws another exception.

    Just a thought.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>