You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2022/08/01 07:51:13 UTC

[GitHub] [ignite-3] sk0x50 commented on a diff in pull request #928: IGNITE-14986 Re-work error handling in meta storage component in accordance with error groups

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: notifications-unsubscribe@ignite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org