SECTION 20.2
CORBA RMI
841
the exception contains no variables. However, exceptions maybe defined to contain variables, for example:
exception FullException {GraphicalObject g };When an exception that
contains variables is raised, the server may use the variables to return information to the client about the context of the exception.
CORBA can also produce system exceptions relating to problems with servers,
such as their being too
busy or unable to be activated, problems with communication and client-side problems. Client programs should handle user-defined and system exceptions. The optional
context expression is used to supply mappings from string names to string values. See Baker [1997] for an explanation of context.
IDL types ◊
IDL supports
fifteen primitive types, which include
short (bit,
long (32- bit,
unsigned short,
unsigned long,
float (bit,
double (bit,
char,
boolean(TRUE, FALSE,
octet (8-bit), and
any (which can represent any primitive or constructed type. Constants of most of the primitive types and constant
strings maybe declared, using the
const keyword. IDL provides
a special type called Object, whose values are remote object references. If a parameter or result is of type
Object, then the corresponding argument may refer to any CORBA object.
IDL’s constructed types are described in Figure 20.8, all of which are passed by value in arguments and results. All arrays or sequences used as
arguments must be defined in typedefs. None of the primitive or constructed data types can contain references.
Share with your friends: