tmgodinho commented on code in PR #7854:
URL: https://github.com/apache/ignite-3/pull/7854#discussion_r3011899708
##########
modules/core/src/main/java/org/apache/ignite/internal/util/ViewUtils.java:
##########
@@ -48,36 +53,35 @@ public static <T> T sync(CompletableFuture<T> fut) {
Thread.currentThread().interrupt(); // Restore interrupt flag.
throw sneakyThrow(ensurePublicException(e));
- } catch (ExecutionException e) {
+ } catch (ExecutionException | CancellationException e) {
Throwable cause = unwrapCause(e);
throw sneakyThrow(ensurePublicException(cause));
}
}
/**
- * Wraps an exception in an IgniteException, extracting trace identifier
and error code when the specified exception or one of its
- * causes is an IgniteException itself.
+ * Ensures the provided exception complies with our public API.
+ * <ol>
+ * <li>Finds the root cause of the exception.</li>
+ * <li>Errors caused by {@link IgniteException} and {@link
IgniteCheckedException} are treated as server-side exceptions.
+ * Their stack trace is rebased to the current stack trace.</li>
+ * <li>Other errors are mapped using {@link
IgniteExceptionMapperUtil#mapToPublicException(Throwable, Function)},
+ * are treated as client-side errors, and their stack trace is not
rebased.</li>
+ * </ol>
Review Comment:
Old javadoc
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]