Module kyotocabinet :: Class Error
[frames] | no frames]

Class Error

Error data.

Instance Methods
 
__init__(self, code, message)
Create an error object.
 
set(self, code, message)
Set the error information.
 
code(self)
Get the error code.
 
name(self)
Get the readable string of the code.
 
message(self)
Get the supplement message.
 
__repr__(self)
Get the representing expression.
 
__str__(self)
Get the string expression.
 
__cmp__(self, right)
Generic comparison operator.
Class Variables
  SUCCESS = 0
error code: success.
  NOIMPL = 1
error code: not implemented.
  INVALID = 2
error code: invalid operation.
  NOREPOS = 3
error code: no repository.
  NOPERM = 4
error code: no permission.
  BROKEN = 5
error code: broken file.
  DUPREC = 6
error code: record duplication.
  NOREC = 7
error code: no record.
  LOGIC = 8
error code: logical inconsistency.
  SYSTEM = 9
error code: system error.
  MISC = 15
error code: miscellaneous error.
Method Details

__init__(self, code, message)
(Constructor)

 

Create an error object.

Parameters:
  • code - the error code.
  • message - the supplement message.
Returns:
the error object.

set(self, code, message)

 

Set the error information.

Parameters:
  • code - the error code.
  • message - the supplement message.
Returns:
always None.

code(self)

 

Get the error code.

Returns:
the error code.

name(self)

 

Get the readable string of the code.

Returns:
the readable string of the code.

message(self)

 

Get the supplement message.

Returns:
the supplement message.

__repr__(self)
(Representation operator)

 

Get the representing expression.

Returns:
the representing expression.

__str__(self)
(Informal representation operator)

 

Get the string expression.

Returns:
the string expression.

__cmp__(self, right)
(Comparison operator)

 

Generic comparison operator.

Parameters:
  • right - an error object or an error code.
Returns:
boolean value of the comparison result.