netudima commented on code in PR #2497:
URL: https://github.com/apache/cassandra/pull/2497#discussion_r2100583148


##########
tools/fqltool/src/org/apache/cassandra/fqltool/commands/Replay.java:
##########
@@ -79,15 +79,15 @@ public void run()
                 if (!basePath.exists() || !basePath.isDirectory())
                 {
                     System.err.println("The results path (" + basePath + ") 
should be an existing directory");
-                    System.exit(1);
+                    throw new IllegalArgumentException("The results path (" + 
basePath + ") should be an existing directory");
                 }
                 resultPaths = targetHosts.stream().map(target -> new 
File(basePath, target)).collect(Collectors.toList());
                 resultPaths.forEach(File::mkdir);
             }
             if (targetHosts.size() < 1)
             {
                 System.err.println("You need to state at least one --target 
host to replay the query against");
-                System.exit(1);
+                throw new IllegalArgumentException("You need to state at least 
one --target host to replay the query against");

Review Comment:
   is it possible to not duplicate the message in error printing and in the 
exception? (here and other similar places)



-- 
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-unsubscr...@cassandra.apache.org

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


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

Reply via email to