E
- the type of the exception.public interface ReWrappableException<E extends java.lang.Exception>
An Exception that can create a new instance of itself, while preserving the original instance as its "cause".
Exceptions snap their stack traces at the time the exception is created. When an exception is thrown across a thread boundary, the stack trace reflects only the stack information on the original thread and not on the calling thread. Hence, you can't tell where the call originated, only the call history on the service thread. This interface indicates that an exception is able to help out in this regard by re-wrapping an original exception with a new instance of itself, thereby creating a new stack trace on the calling thread.Modifier and Type | Method and Description |
---|---|
E |
reWrap(E e)
If we're transitioning between threads, rewrap e in a new instance of E.
|