1.3.6 Managing Errors

The error code return mechanism used with Tuxedo ATMI C and FML C functions is replaced with an exception mechanism in the Tuxedo .NET Workstation Client. You can use the try statement to handle errors using the Tuxedo .NET Workstation Client. Errors are defined into two categories: TPException and FException.

The following code snippet illustrates the Exception Handling (C# Code Example)

……

try {

……
TypedTPINIT tpinfo = new TypedTPINIT();
AppContext ctx1 = AppContext.tpinit(tpinfo); // connect to Tuxedo domain

……
ctx1.tpterm(); // disconnect from Tuxedo domain
 
……
} catch (ApplicationException e) {
 
Console.WriteLine("******Error******, e = {0}", e);

}
……