Kyoto Tycoon

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Static Public Member Functions
kyototycoon::RemoteDB::Error Class Reference

Error data. More...

`#include <ktremotedb.h>`

List of all members.

## Public Types
enum | Code { SUCCESS = RPCClient::RVSUCCESS, NOIMPL = RPCClient::RVENOIMPL, INVALID = RPCClient::RVEINVALID, LOGIC = RPCClient::RVELOGIC, TIMEOUT = RPCClient::RVETIMEOUT, INTERNAL = RPCClient::RVEINTERNAL, NETWORK = RPCClient::RVENETWORK, EMISC = RPCClient::RVEMISC }
| Error codes. More...
## Public Member Functions
| Error ()
| Default constructor.
| Error (const Error &src)
| Copy constructor.
| Error (Code code, const std::string &message)
| Constructor.
| ~Error ()
| Destructor.
void | set (Code code, const std::string &message)
| Set the error information.
Code | code () const
| Get the error code.
const char * | name () const
| Get the readable string of the code.
const char * | message () const
| Get the supplement message.
Error & | operator= (const Error &right)
| Assignment operator from the self type.
| operator int32_t () const
| Cast operator to integer.
## Static Public Member Functions
static const char * | codename (Code code)
| Get the readable string of an error code.

## Detailed Description

Error data.

## Member Enumeration Documentation

enum kyototycoon::RemoteDB::Error::Code

Error codes.

Enumerator:

  SUCCESS | success
  NOIMPL | not implemented
  INVALID | invalid operation
  LOGIC | logical inconsistency
  TIMEOUT | timeout
  INTERNAL | internal error
  NETWORK | network error
  EMISC | miscellaneous error

## Constructor & Destructor Documentation

kyototycoon::RemoteDB::Error::Error | ( |  | ) | `[explicit]`

Default constructor.

kyototycoon::RemoteDB::Error::Error | ( | const Error & | src | ) |

Copy constructor.

Parameters:

  src | the source object.

kyototycoon::RemoteDB::Error::Error | ( | Code | code,
|  | const std::string & | message
| ) |  | `[explicit]`

Constructor.

Parameters:

  code | an error code.
  message | a supplement message.

kyototycoon::RemoteDB::Error::~Error | ( |  | ) |

Destructor.

## Member Function Documentation

void kyototycoon::RemoteDB::Error::set | ( | Code | code,
|  | const std::string & | message
| ) |  |

Set the error information.

Parameters:

  code | an error code.
  message | a supplement message.

Code kyototycoon::RemoteDB::Error::code | ( |  | ) | const

Get the error code.

Returns:
  the error code.

const char* kyototycoon::RemoteDB::Error::name | ( |  | ) | const

Get the readable string of the code.

Returns:
  the readable string of the code.

const char* kyototycoon::RemoteDB::Error::message | ( |  | ) | const

Get the supplement message.

Returns:
  the supplement message.

static const char* kyototycoon::RemoteDB::Error::codename | ( | Code | code | ) | `[static]`

Get the readable string of an error code.

Parameters:

  code | the error code.

Returns:
  the readable string of the error code.

Error& kyototycoon::RemoteDB::Error::operator= | ( | const Error & | right | ) |

Assignment operator from the self type.

Parameters:

  right | the right operand.

Returns:
  the reference to itself.

kyototycoon::RemoteDB::Error::operator int32_t | ( |  | ) | const

Cast operator to integer.

Returns:
  the error code.