OptionParsingException Class

Represents errors that occurs while parsing the command-line options.

C#
public sealed class OptionParsingException : Exception
Inheritance
OptionParsingException
Implements

Constructors

Properties

Option

Gets the option that failed to parse, if any.

Schema

Gets the schema.

Data (Inherited from Exception)
HelpLink (Inherited from Exception)
HResult (Inherited from Exception)
InnerException (Inherited from Exception)
Message (Inherited from Exception)
Source (Inherited from Exception)
StackTrace (Inherited from Exception)
TargetSite (Inherited from Exception)

Methods

GetBaseException() (Inherited from Exception)
GetObjectData(SerializationInfo, StreamingContext) (Inherited from Exception)
GetType() (Inherited from Exception)
ToString() (Inherited from Exception)
Equals(object) (Inherited from object)
GetHashCode() (Inherited from object)
GetType() (Inherited from object)
MemberwiseClone() (Inherited from object)

Constructors Detail

OptionParsingException(OptionSchema, string)

Initializes a new instance of the OptionParsingException class.

C#
public OptionParsingException(OptionSchema schema, string message)

Parameters

schema
OptionSchema

The schema.

message
string

The message that describes the error.

OptionParsingException(Option, string)

Initializes a new instance of the OptionParsingException class.

C#
public OptionParsingException(Option option, string message)

Parameters

option
Option

The option.

message
string

The message that describes the error.

OptionParsingException(Option, string, Exception)

Initializes a new instance of the OptionParsingException class.

C#
public OptionParsingException(Option option, string message, Exception innerException)

Parameters

option
Option

The option.

message
string

The error message that explains the reason for the exception.

innerException
Exception

The exception that is the cause of the current exception, or a null reference if no inner exception is specified.

Properties Detail

Option

Gets the option that failed to parse, if any.

C#
public Option Option { get; }

Property Value

Schema

Gets the schema.

C#
public OptionSchema Schema { get; }

Property Value