V - The type of result of the method to call.T - The type of the throwable to be created.public interface ThrowableCreatingCallable<V,T extends java.lang.Throwable>
extends java.util.concurrent.Callable<V>
| Modifier and Type | Method and Description |
|---|---|
Pair<? extends T,java.util.logging.Level> |
replaceThrowable(java.lang.String msg,
java.lang.Throwable thrown)
Creates a new throwable replacing the designated throwable.
|
Pair<? extends T,java.util.logging.Level> replaceThrowable(java.lang.String msg, java.lang.Throwable thrown)
You must not re-use or wrap the designated throwable! This is allowing to differentiate
the replacing throwable. But make sure the replacing throwable is compatible to all possible
clients calling the actual method.
msg - The message that should be used for the created replacing throwable.thrown - The occurred throwable that should be replaced by a different one. You must not
re-use or wrap this in the replacing throwable.method. Additionally, the log
level to use for the exception can be returned. If the log level is null,
Level.SEVERE will be used.