Error code, with cfcatch.errorcode
To
get more information, use cfcatch.tagContext. This
array shows where control switches from one page to another in the
tag stack (for example, cfinclude, cfmodule).
To
display the information displayed by tagContext variable,
select the “Enable Robust Exception Information” option on the Debugging
& Logging > Debug Output Settings page of the ColdFusion
Administrator.
To use this tag with the object parameter,
first use a cfobject tag that specifies a valid
Java exception class. For example, the following cfobject tag
defines an object, obj, of the exception class myException (which
you must create in Java):
<cfobject
type="java"
action="create"
class="myException"
name="obj">
If your exception class has constructors
that take parameters, such as a message, you can use the special init method
to invoke the constructor, as in the following line. If you do not
need to specify any constructor attributes, you can omit this step.
<cfset obj.init("You must save your work before preceding")>
You
can then use the, the cfthrow statement to throw
the exception as follows:
<cfthrow object=#obj#>
For
more information on using Java objects in ColdFusion, see Integrating
J2EE and Java Elements in CFML Applications in the Developing ColdFusion Applications.