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.4.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
Gets a collection of key/value pairs that provide additional user-defined information about the exception.
(Inherited from Exception.)
Public propertyHelpLink
Gets or sets a link to the help file associated with this exception.
(Inherited from Exception.)
Public propertyHResult
Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.
(Inherited from Exception.)
Public propertyInnerException
Gets the Exception instance that caused the current exception.
(Inherited from Exception.)
Public propertyMessage
Gets a message that describes the current exception.
(Inherited from Exception.)
Public propertySource
Gets or sets the name of the application or the object that causes the error.
(Inherited from Exception.)
Public propertyStackTrace
Gets a string representation of the immediate frames on the call stack.
(Inherited from Exception.)
Public propertyTargetSite
Gets the method that throws the current exception.
(Inherited from Exception.)
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetBaseException
When overridden in a derived class, returns the Exception that is the root cause of one or more subsequent exceptions.
(Inherited from Exception.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetObjectData
Sets the SerializationInfo object with the parameter name and additional exception information.
(Overrides ExceptionGetObjectData(SerializationInfo, StreamingContext).)
Public methodGetType
Gets the runtime type of the current instance.
(Inherited from Exception.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Creates and returns a string representation of the current exception.
(Inherited from Exception.)
Top
Events
  NameDescription
Protected eventSerializeObjectState Obsolete.
Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception.
(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