public static final class AbstractInvocationFuture.ExceptionalResult extends Object
| Constructor and Description |
|---|
ExceptionalResult(Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
Throwable |
getCause() |
String |
toString() |
Throwable |
wrapForJoinInternal()
Wraps the
cause so that the remote/async throwable is not lost,
however is delivered as the cause to an throwable with a local stack trace
that makes sense to user code that is synchronizing on joinInternal(). |
public ExceptionalResult(Throwable cause)
public Throwable getCause()
public Throwable wrapForJoinInternal()
cause so that the remote/async throwable is not lost,
however is delivered as the cause to an throwable with a local stack trace
that makes sense to user code that is synchronizing on joinInternal().
Exception wrapping rules:
CancellationExceptions and OperationTimeoutExceptions
are returned as-is, since they anyway only report the local stack trace.
RuntimeException then the cause
is wrapped in a new throwable of the same class. The resulting throwable has the local
stack trace and reports the async stack trace as the cause
ExecutionException or InvocationTargetException
with a non-null cause, then unwrap and apply the rules for the cause
Error, then it is wrapped in an Error of the same class
with a local stack trace.
HazelcastException reporting the local stack trace,
while the remote stack trace is reported in its cause exception.
Copyright © 2019 Hazelcast, Inc.. All rights reserved.