You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/03/16 11:38:10 UTC

[GitHub] [camel-quarkus] jamesnetherton commented on a change in pull request #2338: Add configuration option to ignore unknown arguments

jamesnetherton commented on a change in pull request #2338:
URL: https://github.com/apache/camel-quarkus/pull/2338#discussion_r595087911



##########
File path: extensions-core/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainConfig.java
##########
@@ -40,4 +46,27 @@
         @ConfigItem(defaultValue = "PT3S")
         public Duration timeout;
     }
+
+    @ConfigGroup
+    public static class ArgumentConfig {
+
+        /**
+         * The action to take when {@link CamelMain} encounters an unknown argument
+         */
+        @ConfigItem(defaultValue = "FAIL")
+        public UnknownArgumentFailMode onUnknown;
+    }
+
+    /**
+     * Options defining the action to take in response to errors parsing unknown command line arguments
+     *
+     * FAIL - Prints the {@link CamelMain} usage statement and throws a {@link RuntimeException}
+     * IGNORE - Suppresses any warnings and the application startup proceeds as normal
+     * WARN - Prints the {@link CamelMain} usage statement but allows the application startup to proceed as normal
+     */
+    public enum UnknownArgumentFailMode {
+        FAIL,
+        IGNORE,
+        WARN
+    }

Review comment:
       Latest commit applies those suggestions.




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

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