Use the cftry and cfcatch tags to catch CORBA object method exceptions thrown by the remote server, as follows:
The cfcatch.getContents method returns a ColdFusion structure containing the data specified 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 |
interface myInterface { exception PrimitiveException { long l; string s; float f; }; void testPrimitiveException() raises (PrimitiveException); } |
CFML |
<cftry> <cfset ret0 = handle.testPrimitiveException()> <cfcatch type=coldfusion.runtime.corba.CorbaUserException> <cfset exceptStruct= cfcatch.getContents()> <cfdump var ="#exceptStruct#"> </cfcatch> </cftry> |