The Ice run time throws run-time exceptions for a number of pre-defined error conditions. All run-time exceptions directly or indirectly derive from
Ice::LocalException (which, in turn, derives from
Ice::Exception).
Ice::LocalException has the usual member functions (
ice_name,
ice_clone,
ice_throw, and (inherited from
Ice::Exception),
ice_print,
ice_file, and
ice_line).
An inheritance diagram for user and run-time exceptions appears in Figure 4.4 on
page 112. By catching exceptions at the appropriate point in the hierarchy, you can handle exceptions according to the category of error they indicate. For example, a
ConnectTimeoutException can be handled as any one of the following exception types:
You will probably have little need to catch exceptions by category; the fine-grained error handling offered by the remainder of the hierarchy is of interest mainly in the implementation of the Ice run time.