next up previous contents
Next: Communication and RPC Facilities Up: The Shore Storage Manager Interface Previous: Thread Management

 

Error Handling

Errors in the SSM (and the rest of Shore) are indicated by an unsigned integer encapsulated in a class that includes stack traces and other debugging aids. The class is w_rc_t (commonly typdefed to rc_t) described in rc(fc). It is the return type for most SSM methods. When linked with a debugging version of the SSM (compiled with #define DEBUG), the destructor of an w_rc_t object verifies that it was checked at least once. If not, the destructor calls w_rc_t::error_not_checked which prints a warning message. An w_rc_t is considered checked when any of its methods that read/examine the error code are called, including the assignment operator. Therefore, simply returning an w_rc_t (which involves an assignment) is considered checking it. Of course, the newly assigned w_rc_t is considered unchecked.

The domain of error codes is an extension of the Unix error codes found in #include <errno.h>. Each layer of the Shore software adds its own extension to the domain. The following layers have error codes which may be returned by SSM methods:

Further discussion of error handling may be found in the Error Codes section of the VAS Tutorial.

VAS writers may wish to use the error handling facility to add their own error codes. See error(fc) for more details.


next up previous contents
Next: Communication and RPC Facilities Up: The Shore Storage Manager Interface Previous: Thread Management
This page was generated from LaTeX sources
10/27/1997