next up previous contents
Next: Communication and RPC Up: The Shore Storage Manager 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 linking with a debugging version of the SSM (compiled with #define DEBUG), the destructor of an w_rc_t object performs auditing to verify that it was checked at least once. If not checked, 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 is given in the tutorial.

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

Marvin Solomon
Fri Aug 2 13:40:00 CDT 1996