|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ExceptionContext
Allows the storage and retrieval of contextual information based on label-value pairs for exceptions.
ContextedException,
ContextedRuntimeException| Method Summary | |
|---|---|
ExceptionContext |
addValue(String label,
Object value)
Adds a contextual label-value pair into this context. |
String |
getFormattedExceptionMessage(String baseMessage)
Implementors provide the given base message with context label/value item information appended. |
Set<String> |
getLabelSet()
Retrieves the labels defined in the contextual data. |
Object |
getValue(String label)
Retrieves a contextual data value associated with the label. |
ExceptionContext |
replaceValue(String label,
Object value)
Replaces a contextual label-value pair of this context. |
| Method Detail |
|---|
ExceptionContext addValue(String label,
Object value)
This label-value pair provides information useful for debugging. If the provided label already exists, it depends on the implementation what happens with the new value.
label - the label of the item to add, null not recommendedvalue - the value of item to add, may be null
ExceptionContext replaceValue(String label,
Object value)
This label-value pair provides information useful for debugging. If the label does not exist yet, it depends on the implementation what happens with the provided value.
label - the label of the item to add, null not recommendedvalue - the value of item to add, may be null
Object getValue(String label)
label - the label to get the contextual value for, may be null
Set<String> getLabelSet()
String getFormattedExceptionMessage(String baseMessage)
baseMessage - the base exception message without context information appended
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||