Table of Contents Previous Next
Logo
Client-Side Slice-to-PHP Mapping : 28.10 Mapping for Run-Time Exceptions
Copyright © 2003-2010 ZeroC, Inc.

28.10 Mapping for Run-Time Exceptions

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).
An inheritance diagram for user and run-time exceptions appears in Figure 4.4 on page 117. By catching exceptions at the appropriate point in the hierarchy, you can handle exceptions according to the category of error they indicate:
• Ice_LocalException
This is the root of the inheritance tree for run-time exceptions.
• Ice_UserException
This is the root of the inheritance tree for user exceptions.
• Ice_TimeoutException
This is the base exception for both operation-invocation and connection-estab­lishment timeouts.
• Ice_ConnectTimeoutException
This exception is raised when the initial attempt to establish a connection to a server times out.
You will probably have little need to catch the remaining run-time exceptions; the fine-grained error handling offered by the remainder of the hierarchy is of interest mainly in the implementation of the Ice run time. However, there is one exception you will probably be interested in specifically: Ice_ObjectNotExistException. This exception is raised if a client invokes an operation on an Ice object that no longer exists. In other words, the client holds a dangling reference to an object that probably existed some time in the past but has since been permanently destroyed.

Table of Contents Previous Next
Logo