TyrantLucifer commented on code in PR #3493:
URL: 
https://github.com/apache/incubator-seatunnel/pull/3493#discussion_r1030322961


##########
seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/FileUtils.java:
##########
@@ -50,6 +54,19 @@ public static Path getConfigPath(AbstractCommandArgs args) {
         }
     }
 
+    /**
+     * Check whether the conf file exists.
+     *
+     * @param configFile the path of the config file
+     */
+    public static void checkConfigExist(Path configFile) {
+        if (!configFile.toFile().exists()) {
+            String message = "Can't find config file: " + configFile;
+            log.error(message);

Review Comment:
   Do not `log.error` before throw exception.



##########
seatunnel-core/seatunnel-core-starter/src/main/java/org/apache/seatunnel/core/starter/utils/FileUtils.java:
##########
@@ -50,6 +54,19 @@ public static Path getConfigPath(AbstractCommandArgs args) {
         }
     }
 
+    /**
+     * Check whether the conf file exists.
+     *
+     * @param configFile the path of the config file
+     */
+    public static void checkConfigExist(Path configFile) {
+        if (!configFile.toFile().exists()) {
+            String message = "Can't find config file: " + configFile;
+            log.error(message);

Review Comment:
   Do not `log.error` before throwing exception.



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