Handling Exceptions - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

In this example, the CORBA object gets called with the second (
enumerator, a.
Double-byte character considerations
If you are using an ORB that supports CORBA later than version 2.0, you do not have to do
anything to support double-byte characters. Strings and characters in ColdFusion will
appropriately convert to wstring and wchar when they are used. However, the CORBA 2.0 IDL
specification does not support the wchar and wstring types, and uses the 8-bit Latin-1 character
set to represent string data. In this case, you cannot pass parameters containing those characters,
however, you can call parameters with char and string types using ColdFusion string data.

Handling exceptions

Use the
and
cftry
remote server, as follows:
Specify
1
type="coldfusion.runtime.corba.CorbaUserException"
catch CORBA exceptions.
Use the
2
cfcatch.getContents
The
cfcatch.getContents
by the IDL for the exception.
The following code example shows the IDL for a CORBA object that raises an exception defined
by the PrimitiveException exception type definition, and the CFML that catches the exception
and displays the contents of the object.
IDL
CFML
tags to catch CORBA object method exceptions thrown by the
cfcatch
method to get the contents of the exception object.
method returns a ColdFusion structure containing the data specified
interface myInterface
{
exception PrimitiveException
{
long l;
string s;
float f;
};
void testPrimitiveException() raises (PrimitiveException);
}
<cftry>
<cfset ret0 = handle.testPrimitiveException()>
<cfcatch type=coldfusion.runtime.corba.CorbaUserException>
<cfset exceptStruct= cfcatch.getContents()>
<cfdump var ="#exceptStruct#">
</cfcatch>
</cftry>
first) entry in the
in the
Creating and using CORBA objects
tag to
cfcatch
783

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion mx

Table of Contents