1 <Type Name="OptionException" FullName="Mono.Options.OptionException">
2 <TypeSignature Language="C#" Value="public class OptionException : Exception" />
3 <TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit OptionException extends System.Exception" />
5 <AssemblyName>Mono.Options</AssemblyName>
6 <AssemblyVersion>0.2.0.0</AssemblyVersion>
7 <AssemblyVersion>0.2.1.0</AssemblyVersion>
8 <AssemblyVersion>0.2.2.0</AssemblyVersion>
11 <BaseTypeName>System.Exception</BaseTypeName>
15 <summary>Represents the error that occurs when there is an error parsing
16 an <see cref="T:Mono.Options.Option" />.</summary>
18 <para>Instances of this class are thrown when:</para>
21 <term>There is an exception generated converting a string to an
22 object of type <typeparamref name="T" /> within the callback
24 <see cref="M:Mono.Options.OptionSet.Add``1(System.String,System.String,System.Action{``0})" />
25 (and related overloads).
30 <see cref="M:Mono.Options.Option.Parse``1(System.String,Mono.Options.OptionContext)" />
31 could not convert a <see cref="T:System.String" /> to an object
32 of type <typeparamref name="T" />.
37 An option with a <see cref="P:Mono.Options.Option.OptionValueType" />
38 value of <see cref="F:Mono.Options.OptionValueType.Required" />
39 does not have a value (usually because the start of the option was
47 <Member MemberName=".ctor">
48 <MemberSignature Language="C#" Value="public OptionException ();" />
49 <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
50 <MemberType>Constructor</MemberType>
52 <AssemblyVersion>0.2.1.0</AssemblyVersion>
53 <AssemblyVersion>0.2.2.0</AssemblyVersion>
57 <summary>To be added.</summary>
58 <remarks>To be added.</remarks>
61 <Member MemberName=".ctor">
62 <MemberSignature Language="C#" Value="protected OptionException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
63 <MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" />
64 <MemberType>Constructor</MemberType>
66 <AssemblyVersion>0.2.0.0</AssemblyVersion>
67 <AssemblyVersion>0.2.1.0</AssemblyVersion>
68 <AssemblyVersion>0.2.2.0</AssemblyVersion>
71 <Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" />
72 <Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" />
76 The <see cref="T:System.Runtime.Serialization.SerializationInfo" />
77 that holds the serialized object data about the exception being
80 <param name="context">
81 The <see cref="T:System.Runtime.Serialization.StreamingContext" />
82 that contains contextual information about the source or
86 Initializes a new instance of the
87 <see cref="T:Mono.Options.OptionException" /> class with serialized
91 This constructor is called during deserialization to reconstitute the
92 exception object transmitted over a stream, e.g. from Remoting.
94 <altmember cref="M:Mono.Options.OptionException.GetObjectData(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
97 <Member MemberName=".ctor">
98 <MemberSignature Language="C#" Value="public OptionException (string message, string optionName);" />
99 <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string message, string optionName) cil managed" />
100 <MemberType>Constructor</MemberType>
102 <AssemblyVersion>0.2.0.0</AssemblyVersion>
103 <AssemblyVersion>0.2.1.0</AssemblyVersion>
104 <AssemblyVersion>0.2.2.0</AssemblyVersion>
107 <Parameter Name="message" Type="System.String" />
108 <Parameter Name="optionName" Type="System.String" />
111 <param name="message">
112 A <see cref="T:System.String" /> that describes the error.
114 <param name="optionName">
115 A <see cref="T:System.String" /> that contains the name of the
116 option that caused the exception.
119 Creates and initializes a new instance of the
120 <see cref="T:Mono.Options.OptionException" /> class.
123 This constructor initializes the
124 <see cref="P:System.Exception.Message" /> property of the new
125 instance using <paramref name="message" />, and the
126 <see cref="P:Mono.Options.OptionException.OptionName" />
127 property of the new instance using <paramref name="optionName" />.
131 <Member MemberName=".ctor">
132 <MemberSignature Language="C#" Value="public OptionException (string message, string optionName, Exception innerException);" />
133 <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string message, string optionName, class System.Exception innerException) cil managed" />
134 <MemberType>Constructor</MemberType>
136 <AssemblyVersion>0.2.0.0</AssemblyVersion>
137 <AssemblyVersion>0.2.1.0</AssemblyVersion>
138 <AssemblyVersion>0.2.2.0</AssemblyVersion>
141 <Parameter Name="message" Type="System.String" />
142 <Parameter Name="optionName" Type="System.String" />
143 <Parameter Name="innerException" Type="System.Exception" />
146 <param name="message">
147 A <see cref="T:System.String" /> that describes the error.
149 <param name="optionName">
150 A <see cref="T:System.String" /> that contains the name of the
151 option that caused the exception.
153 <param name="innerException">
154 An instance of <see cref="T:System.Exception" /> that is the cause
155 of the current exception. If <paramref name="innerException" /> is
156 non-<see langword="null" />, then the current Exception was raised
157 in a catch block handling <paramref name="innerException" />.
160 Creates and initializes a new instance of the
161 <see cref="T:Mono.Options.OptionException" /> class.
164 This constructor initializes the
165 <see cref="P:System.Exception.Message" /> property of the new
166 instance using <paramref name="message" />, the
167 <see cref="P:System.Exception.InnerException" /> property of the new
168 instance using <paramref name="innerException" />, and the
169 <see cref="P:Mono.Options.OptionException.OptionName" />
170 property of the new instance using <paramref name="optionName" />.
174 <Member MemberName="GetObjectData">
175 <MemberSignature Language="C#" Value="public override void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" />
176 <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void GetObjectData(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" />
177 <MemberType>Method</MemberType>
179 <AssemblyVersion>0.2.0.0</AssemblyVersion>
180 <AssemblyVersion>0.2.1.0</AssemblyVersion>
181 <AssemblyVersion>0.2.2.0</AssemblyVersion>
184 <ReturnType>System.Void</ReturnType>
187 <Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" />
188 <Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" />
192 The <see cref="T:System.Runtime.Serialization.SerializationInfo" />
193 that holds the serialized object data about the exception being
196 <param name="context">
197 The <see cref="T:System.Runtime.Serialization.StreamingContext" />
198 that contains contextual information about the source or
202 Adds information about the exception to the provided
203 <see cref="T:System.Runtime.Serialization.SerializationInfo" />
207 Adds information about this exception instance to the provided
208 <see cref="T:System.Runtime.Serialization.SerializationInfo" />,
209 so that a new cloned instance may be properly reconstituted later.
211 <altmember cref="C:Mono.Options.OptionException(System.Runtime.Serialization.SerializationInfo,System.Runtime.Serialization.StreamingContext)" />
214 <Member MemberName="OptionName">
215 <MemberSignature Language="C#" Value="public string OptionName { get; }" />
216 <MemberSignature Language="ILAsm" Value=".property instance string OptionName" />
217 <MemberType>Property</MemberType>
219 <AssemblyVersion>0.2.0.0</AssemblyVersion>
220 <AssemblyVersion>0.2.1.0</AssemblyVersion>
221 <AssemblyVersion>0.2.2.0</AssemblyVersion>
224 <ReturnType>System.String</ReturnType>
228 A <see cref="T:System.String" /> containing the option name that
229 caused the exception.
232 A <see cref="T:System.String" /> containing the option name that
233 caused the exception.