kyotocabinet
Class Error

Object
  extended by Throwable
      extended by Exception
          extended by RuntimeException
              extended by Error
All Implemented Interfaces:
Serializable

public class Error
extends RuntimeException

Error data.

See Also:
Serialized Form

Field Summary
static int BROKEN
          error code: broken file
static int DUPREC
          error code: record duplication
static int INVALID
          error code: invalid operation
static int LOGIC
          error code: logical inconsistency
static int MISC
          error code: miscellaneous error
static int NOIMPL
          error code: not implemented
static int NOPERM
          error code: no permission
static int NOREC
          error code: no record
static int NOREPOS
          error code: no repository.
static int SUCCESS
          error code: success
static int SYSTEM
          error code: system error
 
Constructor Summary
Error()
          Create an instance.
Error(int code, String message)
          Create an instance.
 
Method Summary
 int code()
          Get the error code.
 boolean equals(Error right)
          Check equality.
 String message()
          Get the supplement message.
 String name()
          Get the readable string of the code.
 void set(int code, String message)
          Set the error information.
 String toString()
          Get the string expression.
 
Methods inherited from class Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BROKEN

public static final int BROKEN
error code: broken file

See Also:
Constant Field Values

DUPREC

public static final int DUPREC
error code: record duplication

See Also:
Constant Field Values

INVALID

public static final int INVALID
error code: invalid operation

See Also:
Constant Field Values

LOGIC

public static final int LOGIC
error code: logical inconsistency

See Also:
Constant Field Values

MISC

public static final int MISC
error code: miscellaneous error

See Also:
Constant Field Values

NOIMPL

public static final int NOIMPL
error code: not implemented

See Also:
Constant Field Values

NOPERM

public static final int NOPERM
error code: no permission

See Also:
Constant Field Values

NOREC

public static final int NOREC
error code: no record

See Also:
Constant Field Values

NOREPOS

public static final int NOREPOS
error code: no repository.

See Also:
Constant Field Values

SUCCESS

public static final int SUCCESS
error code: success

See Also:
Constant Field Values

SYSTEM

public static final int SYSTEM
error code: system error

See Also:
Constant Field Values
Constructor Detail

Error

public Error()
Create an instance.


Error

public Error(int code,
             String message)
Create an instance.

Parameters:
code - the error code.
message - the supplement message.
Method Detail

code

public int code()
Get the error code.

Returns:
the error code.

equals

public boolean equals(Error right)
Check equality.

Parameters:
right - an error object.
Returns:
true for the both operands are equal, or false if not.

message

public String message()
Get the supplement message.

Returns:
the supplement message.

name

public String name()
Get the readable string of the code.

Returns:
the readable string of the code.

set

public void set(int code,
                String message)
Set the error information.

Parameters:
code - the error code.
message - the supplement message.

toString

public String toString()
Get the string expression.

Overrides:
toString in class Throwable
Returns:
the string expression.