xorp

XrlError Class Reference

All known error codes arising from XRL dispatches. More...

#include <xrl_error.hh>

List of all members.

Public Member Functions

XrlErrorCode error_code () const
bool isOK () const
const char * error_msg () const
const string & note () const
string str () const
 XrlError (XrlErrorCode error_code, const string &note="")
 XrlError (const XrlError &xe)
 XrlError (const XrlErrlet &x, const string &note="")
 XrlError (const XrlErrlet *)

Static Public Member Functions

static const XrlErrorOKAY ()
 The value that should be returned by functions whose execution completed normally.
static const XrlErrorBAD_ARGS ()
 The value that should be returned when the arguments in an XRL do not match what the receiver expected.
static const XrlErrorCOMMAND_FAILED ()
 The value that should be returned when the command cannot be executed by Xrl Target.
static const XrlErrorNO_FINDER ()
 The Xrl Finder process is not running or not ready to resolve Xrl target names.
static const XrlErrorRESOLVE_FAILED ()
 Returned when an XRL cannot be dispatched because the target name is not registered in the system.
static const XrlErrorNO_SUCH_METHOD ()
 Returned when the method within the XRL is not recognized by the receiver.
static const XrlErrorSEND_FAILED ()
 Returned when the underlying XRL transport mechanism fails.
static const XrlErrorREPLY_TIMED_OUT ()
 Returned when the reply is not returned within the timeout period of the underlying transport mechanism.
static const XrlErrorSEND_FAILED_TRANSIENT ()
 Returned when the underlying XRL transport mechanism fails.
static const XrlErrorINTERNAL_ERROR ()
 An error has occurred within the XRL system.
static bool known_code (uint32_t code)

Protected Attributes

const XrlErrlet_errlet
string _note

Detailed Description

All known error codes arising from XRL dispatches.

These include underlying transport, transport location, and invocation failures.

This class can be sub-classed to provide a sub-set of the known errors, and also to append domain specific errors.


Member Function Documentation

XrlErrorCode XrlError::error_code ( ) const
Returns:
the unique identifer number associated with error.
const char * XrlError::error_msg ( ) const
Returns:
string containing textual description of error.
static const XrlError& XrlError::INTERNAL_ERROR ( ) [static]

An error has occurred within the XRL system.

This is usually a sign of an implementation issue. This error replaces no longer existent errors of CORRUPT_XRL, CORRUPT_XRL_RESPONSE, and BAD_PROTOCOL_VERSION. The note associated with the error should contain more information.

bool XrlError::known_code ( uint32_t  code) [static]
Returns:
true if error_code corresponds to known error.
const string& XrlError::note ( ) const [inline]
Returns:
string containing user annotation about source of error (if set).
string XrlError::str ( ) const [inline]
Returns:
string containing error_code(), error_msg(), and note().

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations