rpuch commented on code in PR #4923:
URL: https://github.com/apache/ignite-3/pull/4923#discussion_r1893911882


##########
modules/core/src/main/java/org/apache/ignite/internal/util/ExceptionUtils.java:
##########
@@ -332,6 +332,52 @@ public static String getFullStackTrace(Throwable 
throwable) {
         return sw.getBuffer().toString();
     }
 
+    /**
+     * Checks if passed in {@code 'Throwable'} has given class in {@code 
'cause'} hierarchy
+     * <b>including</b> that throwable itself.
+     * Note that this method follows includes {@link Throwable#getSuppressed()}
+     * into check.
+     *
+     * @param t Throwable to check (if {@code null}, {@code false} is 
returned).
+     * @param msg Message text that should be in cause.
+     * @param cls Cause classes to check (if {@code null} or empty, {@code 
false} is returned).
+     * @return {@code True} if one of the causing exception is an instance of 
passed in classes,
+     *      {@code false} otherwise.
+     */
+    public static boolean hasCause(@Nullable Throwable t, @Nullable String 
msg, Class<?> @Nullable... cls) {

Review Comment:
   >It seems to me, that this particular test method cannot be applied in our 
case.
   
   Certainly, I did not suggest to use it directly :) I just wanted to say that 
this terminology (causeOrSuppressed) is already in the 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-unsubscr...@ignite.apache.org

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

Reply via email to