sk0x50 commented on code in PR #928:
URL: https://github.com/apache/ignite-3/pull/928#discussion_r934235700
##########
modules/core/src/main/java/org/apache/ignite/internal/util/ExceptionUtils.java:
##########
@@ -324,4 +330,104 @@ public static Throwable unwrapCause(Throwable e) {
return e;
}
+
+ /**
+ * Creates a new exception, which type is defined by the provided {@code
supplier}, with the specified {@code t} as a cause.
+ * In the case when the provided cause {@code t} is an instance of {@link
IgniteInternalException}
+ * or {@link IgniteInternalCheckedException}, the original trace
identifier and full error code are preserved.
+ * Otherwise, a newly generated trace identifier and {@link
Common#UNKNOWN_ERR} are used.
Review Comment:
Fixed as follows:
- `withCause` accepts a new parameter - `defaultCode` which is used when
the provided cause is not an instance of ignite exception
- `withCauseAndCode` which always uses the provided error code.
--
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]