public class BaseException extends Exception
Modifier and Type | Field and Description |
---|---|
static int |
FMT_HTML |
static int |
FMT_JSON |
static int |
FMT_XML |
Modifier | Constructor and Description |
---|---|
protected |
BaseException(int code,
String detail_code,
String description)
Construct a BaseException with the given code, detail code, and description.
|
protected |
BaseException(int code,
String detail_code,
String pidString,
String nodeIdString,
String description,
TreeMap<String,String> trace_information)
Construct a BaseException with the given code, detail code, pid, nodeId,
description, and trace_information.
|
protected |
BaseException(int code,
String detail_code,
String pidString,
String description,
TreeMap<String,String> trace_information)
Construct a BaseException with the given code, detail code, description,
and trace_information.
|
protected |
BaseException(int code,
String detail_code,
String description,
TreeMap<String,String> trace_information)
Construct a BaseException with the given code, detail code, description,
and trace_information.
|
Modifier and Type | Method and Description |
---|---|
void |
addTraceDetail(String key,
String value)
Add new detailed trace information, storing it the value under a known key.
|
int |
getCode() |
String |
getDescription() |
String |
getDetail_code() |
String |
getIdentifier() |
String |
getNodeId()
Get the node Id string
|
String |
getPid()
Deprecated.
As of release 2.4, replaced by
getIdentifier() |
String |
getTraceDetail(String key)
Get the value of one of the trace detail parametersm retrieved by its
key value.
|
Set<String> |
getTraceKeySet()
Return a Set representation of all of the keys for the trace values in
this exception.
|
String |
serialize(int format)
Serialize the format in XML, JSON, or HTML format.
|
protected void |
setCode(int code) |
void |
setDetail_code(String detail_code) |
void |
setIdentifier(String p) |
void |
setNodeId(String nodeIdString)
Set the node Id string
|
void |
setPid(String p)
Deprecated.
As of release 2.4, replaced by
#setIdentifier() |
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public static final int FMT_XML
public static final int FMT_JSON
public static final int FMT_HTML
protected BaseException(int code, String detail_code, String description)
code
- the code used to classify the exceptiondetail_code
- the detailed code for this exceptiondescription
- the description of this exceptionprotected BaseException(int code, String detail_code, String pidString, String nodeIdString, String description, TreeMap<String,String> trace_information)
code
- the code used to classify the exceptiondetail_code
- the detailed code for this exceptionpidString:
- the identifier associated with the exception, and usually with the requestnodeIdString
- the node identifier associated with the exceptiondescription
- the description of this exceptiontrace_information
- containing a Map of key/value pairsprotected BaseException(int code, String detail_code, String pidString, String description, TreeMap<String,String> trace_information)
code
- the code used to classify the exceptiondetail_code
- the detailed code for this exceptionpidString:
- the identifier associated with the exception, and usually with the requestdescription
- the description of this exceptiontrace_information
- containing a Map of key/value pairsprotected BaseException(int code, String detail_code, String description, TreeMap<String,String> trace_information)
code
- the code used to classify the exceptiondetail_code
- the detailed code for this exceptiondescription
- the description of this exceptiontrace_information
- containing a Map of key/value pairsprotected void setCode(int code)
code
- the code to setpublic int getCode()
public void setDetail_code(String detail_code)
detail_code
- the detail_code to setpublic String getDetail_code()
@Deprecated public String getPid()
getIdentifier()
@Deprecated public void setPid(String p)
#setIdentifier()
public String getIdentifier()
public void setIdentifier(String p)
public void setNodeId(String nodeIdString)
nodeIdString
- public String getNodeId()
public String getDescription()
public void addTraceDetail(String key, String value)
key
- the key to index the trace valuevalue
- that trace value to be storedpublic String getTraceDetail(String key)
key
- the key of the trace information to be retrievedpublic Set<String> getTraceKeySet()
public String serialize(int format)
format
- an integer code indicating the formatCopyright © 2020. All Rights Reserved.