You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "jacek-lewandowski (via GitHub)" <gi...@apache.org> on 2023/09/13 07:20:55 UTC

[GitHub] [cassandra] jacek-lewandowski commented on a diff in pull request #2671: CASSANDRA-18820 trunk Fix throwing exception from coordinator in dtests

jacek-lewandowski commented on code in PR #2671:
URL: https://github.com/apache/cassandra/pull/2671#discussion_r1324082897


##########
src/java/org/apache/cassandra/utils/Throwables.java:
##########
@@ -288,12 +288,17 @@ public static Throwable unwrapped(Throwable t)
                unwrapped instanceof InvocationTargetException)
             unwrapped = unwrapped.getCause();
 
-        // I don't think it make sense for those 2 exception classes to ever be used with null causes, but no point
-        // in failing here if this happen. We still wrap the original exception if that happen so we get a sign
-        // that the assumption of this method is wrong.
-        return unwrapped == null
-               ? new RuntimeException("Got wrapping exception not wrapping anything", t)
-               : unwrapped;
+        if (unwrapped == null)
+            throw new RuntimeException("Got wrapping exception not wrapping anything", t);
+
+        if (!t.getStackTrace()[t.getStackTrace().length - 1].getClassName().equals(Thread.class.getName()))

Review Comment:
   Shame on me but I probably accidentally committed some junk. I removed that condition, sorry for the confusion.



-- 
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: pr-unsubscribe@cassandra.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org