sk0x50 commented on code in PR #949:
URL: https://github.com/apache/ignite-3/pull/949#discussion_r928749044


##########
modules/api/src/main/java/org/apache/ignite/lang/IgniteException.java:
##########
@@ -252,4 +254,30 @@ public int errorCode() {
     public UUID traceId() {
         return traceId;
     }
+
+
+    /**
+     * Wraps another exception in IgniteException, extracting {@link #traceId} 
and {@link #code} when the specified exception
+     * or one of its causes is an IgniteException itself.
+     *
+     * @param e Internal exception.
+     * @return Public exception.
+     */
+    public static IgniteException wrap(Throwable e) {
+        e = ExceptionUtils.unwrapCause(e);
+
+        if (e instanceof IgniteException) {

Review Comment:
   It seems to me that we need to add support for `IgniteCheckedException` as 
well.



-- 
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]

Reply via email to