public class Error
extends RuntimeException
| Modifier and Type | Field and Description |
|---|---|
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 and Description |
|---|
Error()
Create an instance.
|
Error(int code,
String message)
Create an instance.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final int BROKEN
public static final int DUPREC
public static final int INVALID
public static final int LOGIC
public static final int MISC
public static final int NOIMPL
public static final int NOPERM
public static final int NOREC
public static final int NOREPOS
public static final int SUCCESS
public static final int SYSTEM
public Error()
public Error(int code,
String message)
code - the error code.message - the supplement message.public int code()
public boolean equals(Error right)
right - an error object.public String message()
public String name()
public void set(int code,
String message)
code - the error code.message - the supplement message.public String toString()
toString in class Throwable