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.

#duplicate(cfcatch).getClass().toString()#

4 Responses to “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.

  2. Hello there,

    Iwas browsing the web and found this blog. Some interesting quotes. Keep them coming!

    Alice
    order diet pill thermocarb

  3. secured loan says:

    Hello there,

    Iwas browsing the web and found this blog. Some interesting quotes. Keep them coming!

    Alice
    secured loan

Leave a Reply