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


##########
modules/failure-handler/src/main/java/org/apache/ignite/internal/failure/FailureManager.java:
##########
@@ -160,14 +158,14 @@ private synchronized boolean process(FailureContext 
failureCtx, FailureHandler h
             return false;
         }
 
-        var exceptionForLogging = new 
StackTraceCapturingException(failureCtx.error());
+        var exceptionForLogging = new 
StackTraceCapturingException(failureCtx.message(), failureCtx.error());
         if (handler.ignoredFailureTypes().contains(failureCtx.type())) {
             LOG.warn(IGNORED_FAILURE_LOG_MSG, exceptionForLogging, handler, 
failureCtx.type());
         } else {
             LOG.error(FAILURE_LOG_MSG, exceptionForLogging, handler, 
failureCtx.type());
         }
 
-        if (reserveBuf != null && hasCauseOrSuppressed(failureCtx.error(), 
OutOfMemoryError.class)) {
+        if (reserveBuf != null && failureCtx.error() != null && 
hasCauseOrSuppressed(failureCtx.error(), OutOfMemoryError.class)) {

Review Comment:
   It seems a bit weird to support nulls as parameters of this method, so I 
preferred to write the condition explicitly instead of method contract 
modification



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