xorp

XrlCmdError Struct Reference

Error codes for user callbacks. More...

#include <xrl_error.hh>

List of all members.

Public Member Functions

 operator XrlError () const
 Convert to XrlError (needed for XRL protocol families).
string str () const
XrlErrorCode error_code () const
bool isOK () const
const string & note () const

Static Public Member Functions

static const XrlCmdErrorOKAY ()
 The default return value.
static const XrlCmdError BAD_ARGS (const string &reason="")
 Return value when the method arguments are incorrect.
static const XrlCmdError COMMAND_FAILED (const string &reason="")
 Return value when the method could not be execute.

Private Member Functions

 XrlCmdError (const XrlError &xe)

Private Attributes

XrlError _xrl_error

Static Private Attributes

static XrlCmdError _xce_ok

Detailed Description

Error codes for user callbacks.

These are a subset of XrlError TODO: Passing these on the stack wastes resources, and comparing them with generated values != XrlCmdError::OKAY(), for instance, is not good for performance or code size either.


Member Function Documentation

XrlErrorCode XrlCmdError::error_code ( ) const [inline]
Returns:
the unique identifer number associated with error.
const string& XrlCmdError::note ( ) const [inline]
Returns:
note associated with origin of error (i.e., the reason).
static const XrlCmdError& XrlCmdError::OKAY ( ) [inline, static]

The default return value.

Indicates that the arguments to the XRL method were correct. Inability to perform operation should still return OKAY(), but the return list should indicate the error.

string XrlCmdError::str ( ) const [inline]
Returns:
string containing representation of command error.

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