Click or drag to resize

CommandLineArgumentException Class

The exception that is thrown when command line parsing failed due to an invalid command line.
Inheritance Hierarchy
SystemObject
  SystemException
    Ookii.CommandLineCommandLineArgumentException

Namespace:  Ookii.CommandLine
Assembly:  Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 2.3.0
Syntax
[SerializableAttribute]
public class CommandLineArgumentException : Exception

The CommandLineArgumentException type exposes the following members.

Constructors
  NameDescription
Public methodCommandLineArgumentException
Initializes a new instance of the CommandLineArgumentException class.
Public methodCommandLineArgumentException(String)
Initializes a new instance of the CommandLineArgumentException class with a specified error message.
Protected methodCommandLineArgumentException(SerializationInfo, StreamingContext)
Initializes a new instance of the CommandLineArgumentException class with serialized data.
Public methodCommandLineArgumentException(String, CommandLineArgumentErrorCategory)
Initializes a new instance of the CommandLineArgumentException class with a specified error message.
Public methodCommandLineArgumentException(String, Exception)
Initializes a new instance of the CommandLineArgumentException class with a specified error message and a reference to the inner Exception that is the cause of this CommandLineArgumentException.
Public methodCommandLineArgumentException(String, CommandLineArgumentErrorCategory, Exception)
Initializes a new instance of the CommandLineArgumentException class with a specified error message and a reference to the inner Exception that is the cause of this CommandLineArgumentException.
Public methodCommandLineArgumentException(String, String, CommandLineArgumentErrorCategory)
Initializes a new instance of the CommandLineArgumentException class with a specified error message and argument name.
Public methodCommandLineArgumentException(String, String, CommandLineArgumentErrorCategory, Exception)
Initializes a new instance of the CommandLineArgumentException class with a specified error message and argument name, and a reference to the inner Exception that is the cause of this CommandLineArgumentException.
Top
Properties
  NameDescription
Public propertyArgumentName
Gets the name of the argument that was invalid.
Public propertyCategory
Gets the category of this error.
Public propertyData (Inherited from Exception.)
Public propertyHelpLink (Inherited from Exception.)
Protected propertyHResult (Inherited from Exception.)
Public propertyInnerException (Inherited from Exception.)
Public propertyMessage (Inherited from Exception.)
Public propertySource (Inherited from Exception.)
Public propertyStackTrace (Inherited from Exception.)
Public propertyTargetSite (Inherited from Exception.)
Top
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetBaseException (Inherited from Exception.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetObjectData
Sets the SerializationInfo object with the parameter name and additional exception information.
(Overrides ExceptionGetObjectData(SerializationInfo, StreamingContext).)
Public methodGetType (Inherited from Exception.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Exception.)
Top
Remarks

This exception indicates that the command line passed to the Parse(String) method was invalid for the arguments defined by the CommandLineParser instance.

The exception can indicate that too many positional arguments were supplied, a required argument was not supplied, an unknown argument name was supplied, no value was supplied for a named argument, an argument was supplied more than once and the AllowDuplicateArguments property is , or one of the argument values could not be converted to the argument's type.

Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also