1 <Type Name="OptionException" FullName="Mono.Options.OptionException">
2 <TypeSignature Language="C#" Value="public class OptionException : Exception" />
4 <AssemblyName>Mono.Options</AssemblyName>
5 <AssemblyVersion>0.2.0.0</AssemblyVersion>
6 <AssemblyVersion>0.2.1.0</AssemblyVersion>
9 <BaseTypeName>System.Exception</BaseTypeName>
13 <summary>Represents the error that occurs when there is an error parsing
14 an <see cref="T:Mono.Options.Option" />.</summary>
16 <para>Instances of this class are thrown when:</para>
19 <term>There is an exception generated converting a string to an
20 object of type <typeparamref name="T" /> within the callback
22 <see cref="M:Mono.Options.OptionSet.Add``1(System.String,System.String,System.Action{``0})" />
23 (and related overloads).
28 <see cref="M:Mono.Options.Option.Parse``1(System.String,Mono.Options.OptionContext)" />
29 could not convert a <see cref="T:System.String" /> to an object
30 of type <typeparamref name="T" />.
35 An option with a <see cref="P:Mono.Options.Option.OptionValueType" />
36 value of <see cref="F:Mono.Options.OptionValueType.Required" />
37 does not have a value (usually because the start of the option was
45 <Member MemberName=".ctor">
46 <MemberSignature Language="C#" Value="public OptionException ();" />
47 <MemberType>Constructor</MemberType>
49 <AssemblyVersion>0.2.1.0</AssemblyVersion>
53 <summary>To be added.</summary>
54 <remarks>To be added.</remarks>
57 <Member MemberName=".ctor">
58 <MemberSignature Language="C#" Value="protected OptionException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
59 <MemberType>Constructor</MemberType>
61 <AssemblyVersion>0.2.0.0</AssemblyVersion>
62 <AssemblyVersion>0.2.1.0</AssemblyVersion>
65 <Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" />
66 <Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" />
70 The <see cref="T:System.Runtime.Serialization.SerializationInfo" />
71 that holds the serialized object data about the exception being
74 <param name="context">
75 The <see cref="T:System.Runtime.Serialization.StreamingContext" />
76 that contains contextual information about the source or
80 Initializes a new instance of the
81 <see cref="T:Mono.Options.OptionException" /> class with serialized
85 This constructor is called during deserialization to reconstitute the
86 exception object transmitted over a stream, e.g. from Remoting.
88 <altmember cref="M:Mono.Options.OptionException.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
91 <Member MemberName=".ctor">
92 <MemberSignature Language="C#" Value="public OptionException (string message, string optionName);" />
93 <MemberType>Constructor</MemberType>
95 <AssemblyVersion>0.2.0.0</AssemblyVersion>
96 <AssemblyVersion>0.2.1.0</AssemblyVersion>
99 <Parameter Name="message" Type="System.String" />
100 <Parameter Name="optionName" Type="System.String" />
103 <param name="message">
104 A <see cref="T:System.String" /> that describes the error.
106 <param name="optionName">
107 A <see cref="T:System.String" /> that contains the name of the
108 option that caused the exception.
111 Creates and initializes a new instance of the
112 <see cref="T:Mono.Options.OptionException" /> class.
115 This constructor initializes the
116 <see cref="P:System.Exception.Message" /> property of the new
117 instance using <paramref name="message" />, and the
118 <see cref="P:Mono.Options.OptionException.OptionName" />
119 property of the new instance using <paramref name="optionName" />.
123 <Member MemberName=".ctor">
124 <MemberSignature Language="C#" Value="public OptionException (string message, string optionName, Exception innerException);" />
125 <MemberType>Constructor</MemberType>
127 <AssemblyVersion>0.2.0.0</AssemblyVersion>
128 <AssemblyVersion>0.2.1.0</AssemblyVersion>
131 <Parameter Name="message" Type="System.String" />
132 <Parameter Name="optionName" Type="System.String" />
133 <Parameter Name="innerException" Type="System.Exception" />
136 <param name="message">
137 A <see cref="T:System.String" /> that describes the error.
139 <param name="optionName">
140 A <see cref="T:System.String" /> that contains the name of the
141 option that caused the exception.
143 <param name="innerException">
144 An instance of <see cref="T:System.Exception" /> that is the cause
145 of the current exception. If <paramref name="innerException" /> is
146 non-<see langword="null" />, then the current Exception was raised
147 in a catch block handling <paramref name="innerException" />.
150 Creates and initializes a new instance of the
151 <see cref="T:Mono.Options.OptionException" /> class.
154 This constructor initializes the
155 <see cref="P:System.Exception.Message" /> property of the new
156 instance using <paramref name="message" />, the
157 <see cref="P:System.Exception.InnerException" /> property of the new
158 instance using <paramref name="innerException" />, and the
159 <see cref="P:Mono.Options.OptionException.OptionName" />
160 property of the new instance using <paramref name="optionName" />.
164 <Member MemberName="GetObjectData">
165 <MemberSignature Language="C#" Value="public override void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
166 <MemberType>Method</MemberType>
168 <AssemblyVersion>0.2.0.0</AssemblyVersion>
169 <AssemblyVersion>0.2.1.0</AssemblyVersion>
172 <ReturnType>System.Void</ReturnType>
175 <Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" />
176 <Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" />
180 The <see cref="T:System.Runtime.Serialization.SerializationInfo" />
181 that holds the serialized object data about the exception being
184 <param name="context">
185 The <see cref="T:System.Runtime.Serialization.StreamingContext" />
186 that contains contextual information about the source or
190 Adds information about the exception to the provided
191 <see cref="T:System.Runtime.Serialization.SerializationInfo" />
195 Adds information about this exception instance to the provided
196 <see cref="T:System.Runtime.Serialization.SerializationInfo" />,
197 so that a new cloned instance may be properly reconstituted later.
199 <altmember cref="C:Mono.Options.OptionException(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
202 <Member MemberName="OptionName">
203 <MemberSignature Language="C#" Value="public string OptionName { get; }" />
204 <MemberType>Property</MemberType>
206 <AssemblyVersion>0.2.0.0</AssemblyVersion>
207 <AssemblyVersion>0.2.1.0</AssemblyVersion>
210 <ReturnType>System.String</ReturnType>
214 A <see cref="T:System.String" /> containing the option name that
215 caused the exception.
218 A <see cref="T:System.String" /> containing the option name that
219 caused the exception.