Class CheckedExceptionWrapper
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
io.temporal.serviceclient.CheckedExceptionWrapper
- All Implemented Interfaces:
Serializable
Do not reference directly by the application level code. Use
io.temporal.workflow.Workflow#wrap(Exception) inside a workflow code and
io.temporal.activity.Activity#wrap(Throwable) inside an activity code instead.- See Also:
-
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
wrap
Returns CheckedExceptionWrapper if e is checked exception. If there is a need to return a checked exception from an activity or workflow implementation throw a wrapped exception it using this method. The library code will unwrap it automatically when propagating exception to the caller.try { return someCall(); } catch (Exception e) { throw CheckedExceptionWrapper.wrap(e); } -
unwrap
-