@InterfaceAudience.Public @InterfaceStability.Unstable public class BKException extends java.lang.Exception
Modifier and Type | Class and Description |
---|---|
static interface |
BKException.Code
Codes which represent the various exception types.
|
Modifier and Type | Field and Description |
---|---|
protected int |
code |
(package private) static java.util.function.Function<java.lang.Throwable,BKException> |
HANDLER |
Constructor and Description |
---|
BKException(int code)
Create a new exception.
|
BKException(int code,
java.lang.Throwable cause)
Create a new exception with the cause.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
codeLogger(int code)
Returns a lazy error code formatter suitable to pass to log functions.
|
int |
getCode()
Get the return code for the exception.
|
static java.lang.String |
getMessage(int code)
Describe an error code.
|
static final java.util.function.Function<java.lang.Throwable,BKException> HANDLER
protected final int code
public BKException(int code)
code
- the error codeBKException.Code
public BKException(int code, java.lang.Throwable cause)
code
- exception codecause
- the exception causepublic final int getCode()
BKException.Code
public static java.lang.Object codeLogger(int code)
code
- the error code valuepublic static java.lang.String getMessage(int code)
code
- the error code valueCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.