Package org.pepsoft.util.mdc
Class MDCCapturingRuntimeException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.pepsoft.util.mdc.MDCCapturingRuntimeException
- All Implemented Interfaces:
Serializable,MDCContextProvider
A
RuntimeException which captures the current contents of the MDC thread local diagnostic context at
the moment of throwing. The captured context is available from the getMdcContext() method.
This exception is meant for adding semantic information to the exception chain. To just capture the MDC
context, use MDCWrappingRuntimeException.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMDCCapturingRuntimeException(String message) MDCCapturingRuntimeException(String message, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionGet the diagnostic context map.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
MDCCapturingRuntimeException
-
MDCCapturingRuntimeException
-
-
Method Details
-
getMdcContext
Description copied from interface:MDCContextProviderGet the diagnostic context map. May benull.- Specified by:
getMdcContextin interfaceMDCContextProvider
-