Kyoto Cabinet

- Main Page
- Namespaces
- Classes
- Files

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

Public Types | Public Member Functions | Static Public Member Functions
kyotocabinet::BasicDB::Error Class Reference

Error data. More...

`#include <kcdb.h>`

List of all members.

## Public Types
enum | Code { SUCCESS, NOIMPL, INVALID, NOREPOS, NOPERM, BROKEN, DUPREC, NOREC, LOGIC, SYSTEM, MISC = 15 }
| Error codes. More...
## Public Member Functions
| Error ()
| Default constructor.
| Error (const Error &src)
| Copy constructor.
| Error (Code code, const char *message)
| Constructor.
| ~Error ()
| Destructor.
void | set (Code code, const char *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 kyotocabinet::BasicDB::Error::Code

Error codes.

Enumerator:

  SUCCESS | success
  NOIMPL | not implemented
  INVALID | invalid operation
  NOREPOS | no repository
  NOPERM | no permission
  BROKEN | broken file
  DUPREC | record duplication
  NOREC | no record
  LOGIC | logical inconsistency
  SYSTEM | system error
  MISC | miscellaneous error

## Constructor & Destructor Documentation

kyotocabinet::BasicDB::Error::Error | ( |  | ) | `[explicit]`

Default constructor.

kyotocabinet::BasicDB::Error::Error | ( | const Error & | src | ) |

Copy constructor.

Parameters:

  src | the source object.

kyotocabinet::BasicDB::Error::Error | ( | Code | code,
|  | const char * | message
| ) |  | `[explicit]`

Constructor.

Parameters:

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

kyotocabinet::BasicDB::Error::~Error | ( |  | ) |

Destructor.

## Member Function Documentation

void kyotocabinet::BasicDB::Error::set | ( | Code | code,
|  | const char * | message
| ) |  |

Set the error information.

Parameters:

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

Code kyotocabinet::BasicDB::Error::code | ( |  | ) | const

Get the error code.

Returns:
  the error code.

const char* kyotocabinet::BasicDB::Error::name | ( |  | ) | const

Get the readable string of the code.

Returns:
  the readable string of the code.

const char* kyotocabinet::BasicDB::Error::message | ( |  | ) | const

Get the supplement message.

Returns:
  the supplement message.

static const char* kyotocabinet::BasicDB::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& kyotocabinet::BasicDB::Error::operator= | ( | const Error & | right | ) |

Assignment operator from the self type.

Parameters:

  right | the right operand.

Returns:
  the reference to itself.

kyotocabinet::BasicDB::Error::operator int32_t | ( |  | ) | const

Cast operator to integer.

Returns:
  the error code.