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



##########
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:
       There is `org.apache.camel.quarkus.core.CamelConfig.FailureRemedy` which 
I assume is visible here. Shouldn't we re-use it?  
   Wouldn't the `ArgumentConfig.onUnknown` field be a better place for the 
FAIL/IGNORE/WARN JavaDoc? - in that way user could see it on the extension 
page. 




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to