May 2001
Intermediate to advanced
1088 pages
30h 13m
English
So far, you've seen how to declare methods and attributes in IDL. You can also declare exceptions, structures, and alternate data types.
You declare an IDL exception using the following form:
exception exceptionName { member declarations }
As you can see, an exception can have member variables. When you declare member variables for an exception, the IDL-to-Java compiler generates two constructors for the exception, one that takes no parameters and one that takes values for each member variable in the same order that you declared them in the IDL file.
Listing 17.4 shows an example exception declaration.
exception InvalidDataException { string reason; long errorCode; ... |
Read now
Unlock full access