Package com.adaptris.core.json.exception
Class ExceptionWithStacktrace
- java.lang.Object
-
- com.adaptris.core.json.exception.ExceptionAsJson
-
- com.adaptris.core.json.exception.ExceptionWithStacktrace
-
- All Implemented Interfaces:
ExceptionSerializer
@ComponentProfile(summary="Serialize an exception as JSON, along with the stack trace, when using ExceptionReportService", tag="json") public class ExceptionWithStacktrace extends ExceptionAsJson
Write the exception as a JSON object usingjackson-databind
when using aExceptionReportService
.Note that this implementation doesn't write any of the exception causes, as it is possible that they are self-referential, which will cause a problem when trying to serialize them using jackson; it just captures the stack-trace in addition to information captured by
ExceptionAsJson
.In the adapter configuration file this class is aliased as exception-as-json-with-stacktrace which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Constructor Summary
Constructors Constructor Description ExceptionWithStacktrace()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,java.lang.Object>
createReport(java.lang.Exception exc, AdaptrisMessage msg)
-
Methods inherited from class com.adaptris.core.json.exception.ExceptionAsJson
serialize
-
-
-
-
Method Detail
-
createReport
protected java.util.Map<java.lang.String,java.lang.Object> createReport(java.lang.Exception exc, AdaptrisMessage msg)
- Overrides:
createReport
in classExceptionAsJson
-
-