Class ConfigHasDefaultsButHasNoArg

java.lang.Object
java.lang.Throwable
java.lang.Exception
com.github.sttk.cliargs.exceptions.InvalidOption
com.github.sttk.cliargs.exceptions.ConfigHasDefaultsButHasNoArg
All Implemented Interfaces:
Serializable

public class ConfigHasDefaultsButHasNoArg extends InvalidOption
Is the exception which indicates that an option configuration contradicts that the default arguments is not empty though it does not take option arguments.
See Also:
  • Field Details

    • storeKey

      public final String storeKey
      The store key of the option configuration that caused this exception.
    • name

      public final String name
      The first name of the option configuration.
  • Constructor Details

    • ConfigHasDefaultsButHasNoArg

      public ConfigHasDefaultsButHasNoArg(String storeKey, String name)
      Constructs an instance of this class.
      Parameters:
      storeKey - The store key of the option configuration that caused this exception.
      name - The first name of the option configuration.
  • Method Details

    • option

      public String option()
      Gets the option name that caused this exception.
      Specified by:
      option in class InvalidOption
      Returns:
      The option name.
    • getMessage

      public String getMessage()
      Returns a string which represents the content of this exception.
      Overrides:
      getMessage in class Throwable
      Returns:
      The exception message.