AbstractMap.SimpleEntry, AbstractMap.SimpleImmutableEntry
Modifier and Type | Field and Description |
---|---|
static String |
CODE_KEY
Key for a numeric or textual code identifying the error.
|
static String |
DEBUGTXT_KEY
Key for debugging information such as a stack trace.
|
static String |
ERRORTXT_KEY
Key for short description of what went wrong.
|
static String |
USERTXT_KEY
Key for free-form text given more information about the error.
|
Constructor and Description |
---|
ErrInfo()
Constructs an empty ErrInfo.
|
ErrInfo(Map map)
Constructs an ErrInfo based on an existing map.
|
ErrInfo(String errortxt)
Constructs an ErrInfo with a given
ERRORTXT_KEY value. |
ErrInfo(Throwable e)
Constructs an ErrInfo based on a given Throwable.
|
Modifier and Type | Method and Description |
---|---|
static ErrInfo |
asErrInfo(Map map)
Returns a given map as an ErrInfo object.
|
void |
check()
Checks that this object is ready for use with the SAMP toolkit.
|
String |
getCode()
Returns the value for the
CODE_KEY key. |
String |
getDebugtxt()
Returns the value for the
DEBUGTXT_KEY key. |
String |
getErrortxt()
Returns the value for the
ERRORTXT_KEY key. |
String |
getUsertxt()
Returns the value for the
USERTXT_KEY key. |
void |
setCode(String code)
Sets the value for the
CODE_KEY key. |
void |
setDebugtxt(String debugtxt)
Sets the value for the
DEBUGTXT_KEY key. |
void |
setErrortxt(String errortxt)
Sets the value for the
ERRORTXT_KEY key. |
void |
setUsertxt(String usertxt)
Sets the value for the
USERTXT_KEY key. |
checkHasKeys, entrySet, getList, getMap, getString, getUrl, put
clear, clone, containsKey, containsValue, equals, get, hashCode, isEmpty, keySet, putAll, remove, size, toString, values
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
public static final String ERRORTXT_KEY
public static final String USERTXT_KEY
public static final String DEBUGTXT_KEY
public static final String CODE_KEY
public ErrInfo()
public ErrInfo(Throwable e)
e
- errorpublic ErrInfo(Map map)
map
- map containing initial data for this objectpublic ErrInfo(String errortxt)
ERRORTXT_KEY
value.errortxt
- short string describing what went wrongpublic void setErrortxt(String errortxt)
ERRORTXT_KEY
key.errortxt
- short string describing what went wrongpublic String getErrortxt()
ERRORTXT_KEY
key.public void setUsertxt(String usertxt)
USERTXT_KEY
key.usertxt
- free-form string giving more detail on the errorpublic String getUsertxt()
USERTXT_KEY
key.public void setDebugtxt(String debugtxt)
DEBUGTXT_KEY
key.debugtxt
- string containing debugging information, such as a
a stack tracepublic String getDebugtxt()
DEBUGTXT_KEY
key.public void setCode(String code)
CODE_KEY
key.code
- numeric or textual code identifying the errorpublic String getCode()
CODE_KEY
key.public void check()
SampMap
SampUtils.checkMap(java.util.Map)
(ensuring that all keys
are Strings, and all values Strings, Lists or Maps), subclass-specific
invariants may be checked. In the case that there's something wrong,
an informative DataException
will be thrown.Copyright © 2008–2024. All rights reserved.