imbajin commented on code in PR #3462:
URL: https://github.com/apache/hugegraph/pull/3462#discussion_r4505047166


##########
hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/dist/HugeGremlinServer.java:
##########
@@ -87,7 +87,7 @@ public static GremlinServer startPrepared(GremlinServer 
server)
             LOG.error("Gremlin Server was unable to start and will " +
                       "shutdown now: {}", t.getMessage());
             server.stop().join();
-            throw new HugeException("Failed to start Gremlin Server");
+            throw new HugeException("Failed to start Gremlin Server", t);

Review Comment:
   ⚠️ **Important:** If `stop().join()` also fails, it throws before this 
wrapper is created, so the startup cause is still lost. Please retain the 
startup failure as the primary cause and attach the shutdown failure as 
suppressed, with a test where both futures fail.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to