Use the cftry and cfcatch tags to catch CORBA object method exceptions thrown by the remote server, as follows:

  1. Specify type="coldfusion.runtime.corba.CorbaUserException" in the cfcatch tag to catch CORBA exceptions.
  2. Use the cfcatch.getContents method to get the contents of the exception object.
    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.



interface myInterface
exception PrimitiveException
long l;
string s;
float f;
void testPrimitiveException() raises (PrimitiveException);




<cfset ret0 = handle.testPrimitiveException()>
<cfcatch type=coldfusion.runtime.corba.CorbaUserException>
<cfset exceptStruct= cfcatch.getContents()>
<cfdump var ="#exceptStruct#">


This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy