mscorlib(4.0.0.0) API with additions
System.Configuration.ConfigurationException Class Reference

The exception that is thrown when a configuration system error has occurred. More...

Inheritance diagram for System.Configuration.ConfigurationException:
[legend]
Collaboration diagram for System.Configuration.ConfigurationException:
[legend]

Public Member Functions

 ConfigurationException ()
 Initializes a new instance of the T:System.Configuration.ConfigurationException class. More...
 
 ConfigurationException (string message)
 Initializes a new instance of the T:System.Configuration.ConfigurationException class. More...
 
 ConfigurationException (string message, Exception inner)
 Initializes a new instance of the T:System.Configuration.ConfigurationException class. More...
 
 ConfigurationException (string message, XmlNode node)
 Initializes a new instance of the T:System.Configuration.ConfigurationException class. More...
 
 ConfigurationException (string message, Exception inner, XmlNode node)
 Initializes a new instance of the T:System.Configuration.ConfigurationException class. More...
 
 ConfigurationException (string message, string filename, int line)
 Initializes a new instance of the T:System.Configuration.ConfigurationException class. More...
 
 ConfigurationException (string message, Exception inner, string filename, int line)
 Initializes a new instance of the T:System.Configuration.ConfigurationException class. More...
 
override void GetObjectData (SerializationInfo info, StreamingContext context)
 Sets the T:System.Runtime.Serialization.SerializationInfo object with the file name and line number at which this configuration exception occurred. More...
 
- Public Member Functions inherited from System.SystemException
 SystemException ()
 Initializes a new instance of the T:System.SystemException class. More...
 
 SystemException (string message)
 Initializes a new instance of the T:System.SystemException class with a specified error message. More...
 
 SystemException (string message, Exception innerException)
 Initializes a new instance of the T:System.SystemException class with a specified error message and a reference to the inner exception that is the cause of this exception. More...
 
- Public Member Functions inherited from System.Exception
 Exception ()
 Initializes a new instance of the T:System.Exception class. More...
 
 Exception (string message)
 Initializes a new instance of the T:System.Exception class with a specified error message. More...
 
 Exception (string message, Exception innerException)
 Initializes a new instance of the T:System.Exception class with a specified error message and a reference to the inner exception that is the cause of this exception. More...
 
virtual Exception GetBaseException ()
 When overridden in a derived class, returns the T:System.Exception that is the root cause of one or more subsequent exceptions. More...
 
override string ToString ()
 Creates and returns a string representation of the current exception. More...
 
new Type GetType ()
 Gets the runtime type of the current instance. More...
 
- Public Member Functions inherited from System.Runtime.InteropServices._Exception
new bool Equals (object obj)
 Provides COM objects with version-independent access to the M:System.Object.Equals(System.Object) method. More...
 
new int GetHashCode ()
 Provides COM objects with version-independent access to the M:System.Object.GetHashCode method. More...
 

Static Public Member Functions

static string GetXmlNodeFilename (XmlNode node)
 Gets the path to the configuration file from which the internal T:System.Xml.XmlNode object was loaded when this configuration exception was thrown. More...
 
static int GetXmlNodeLineNumber (XmlNode node)
 Gets the line number within the configuration file that the internal T:System.Xml.XmlNode object represented when this configuration exception was thrown. More...
 

Public Attributes

virtual string BareMessage => base.Message
 Gets a description of why this configuration exception was thrown. More...
 
virtual string Filename => SafeFilename(_filename)
 Gets the path to the configuration file that caused this configuration exception to be thrown. More...
 
virtual int Line => _line
 Gets the line number within the configuration file at which this configuration exception was thrown. More...
 

Protected Member Functions

 ConfigurationException (SerializationInfo info, StreamingContext context)
 Initializes a new instance of the T:System.Configuration.ConfigurationException class. More...
 
- Protected Member Functions inherited from System.SystemException
 SystemException (SerializationInfo info, StreamingContext context)
 Initializes a new instance of the T:System.SystemException class with serialized data. More...
 
- Protected Member Functions inherited from System.Exception
 Exception (SerializationInfo info, StreamingContext context)
 Initializes a new instance of the T:System.Exception class with serialized data. More...
 

Properties

override string Message [get]
 Gets an extended description of why this configuration exception was thrown. More...
 
- Properties inherited from System.Exception
virtual string Message [get]
 Gets a message that describes the current exception. More...
 
virtual IDictionary Data [get]
 Gets a collection of key/value pairs that provide additional user-defined information about the exception. More...
 
Exception InnerException [get]
 Gets the T:System.Exception instance that caused the current exception. More...
 
MethodBase TargetSite [get]
 Gets the method that throws the current exception. More...
 
virtual string StackTrace [get]
 Gets a string representation of the immediate frames on the call stack. More...
 
virtual string HelpLink [get, set]
 Gets or sets a link to the help file associated with this exception. More...
 
virtual string Source [get, set]
 Gets or sets the name of the application or the object that causes the error. More...
 
int HResult [get, protected set]
 Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. More...
 
EventHandler< SafeSerializationEventArgsSerializeObjectState
 Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. More...
 
- Properties inherited from System.Runtime.InteropServices._Exception
string Message [get]
 Provides COM objects with version-independent access to the P:System.Exception.Message property. More...
 
string StackTrace [get]
 Provides COM objects with version-independent access to the P:System.Exception.StackTrace property. More...
 
string HelpLink [get, set]
 Provides COM objects with version-independent access to the P:System.Exception.HelpLink property. More...
 
string Source [get, set]
 Provides COM objects with version-independent access to the P:System.Exception.Source property. More...
 
Exception InnerException [get]
 Provides COM objects with version-independent access to the P:System.Exception.InnerException property. More...
 
MethodBase TargetSite [get]
 Provides COM objects with version-independent access to the P:System.Exception.TargetSite property. More...
 

Detailed Description

The exception that is thrown when a configuration system error has occurred.

Definition at line 13 of file ConfigurationException.cs.

Constructor & Destructor Documentation

◆ ConfigurationException() [1/8]

System.Configuration.ConfigurationException.ConfigurationException ( SerializationInfo  info,
StreamingContext  context 
)
protected

Initializes a new instance of the T:System.Configuration.ConfigurationException class.

Parameters
infoThe object that holds the information to deserialize.
contextContextual information about the source or destination.

Definition at line 66 of file ConfigurationException.cs.

◆ ConfigurationException() [2/8]

System.Configuration.ConfigurationException.ConfigurationException ( )

Initializes a new instance of the T:System.Configuration.ConfigurationException class.

Definition at line 74 of file ConfigurationException.cs.

◆ ConfigurationException() [3/8]

System.Configuration.ConfigurationException.ConfigurationException ( string  message)

Initializes a new instance of the T:System.Configuration.ConfigurationException class.

Parameters
messageA message describing why this T:System.Configuration.ConfigurationException exception was thrown.

Definition at line 82 of file ConfigurationException.cs.

◆ ConfigurationException() [4/8]

System.Configuration.ConfigurationException.ConfigurationException ( string  message,
Exception  inner 
)

Initializes a new instance of the T:System.Configuration.ConfigurationException class.

Parameters
messageA message describing why this T:System.Configuration.ConfigurationException exception was thrown.
innerThe inner exception that caused this T:System.Configuration.ConfigurationException to be thrown, if any.

Definition at line 91 of file ConfigurationException.cs.

◆ ConfigurationException() [5/8]

System.Configuration.ConfigurationException.ConfigurationException ( string  message,
XmlNode  node 
)

Initializes a new instance of the T:System.Configuration.ConfigurationException class.

Parameters
messageA message describing why this T:System.Configuration.ConfigurationException exception was thrown.
nodeThe T:System.Xml.XmlNode that caused this T:System.Configuration.ConfigurationException to be thrown.

Definition at line 100 of file ConfigurationException.cs.

◆ ConfigurationException() [6/8]

System.Configuration.ConfigurationException.ConfigurationException ( string  message,
Exception  inner,
XmlNode  node 
)

Initializes a new instance of the T:System.Configuration.ConfigurationException class.

Parameters
messageA message describing why this T:System.Configuration.ConfigurationException exception was thrown.
innerThe inner exception that caused this T:System.Configuration.ConfigurationException to be thrown, if any.
nodeThe T:System.Xml.XmlNode that caused this T:System.Configuration.ConfigurationException to be thrown.

Definition at line 110 of file ConfigurationException.cs.

◆ ConfigurationException() [7/8]

System.Configuration.ConfigurationException.ConfigurationException ( string  message,
string  filename,
int  line 
)

Initializes a new instance of the T:System.Configuration.ConfigurationException class.

Parameters
messageA message describing why this T:System.Configuration.ConfigurationException exception was thrown.
filenameThe path to the configuration file that caused this T:System.Configuration.ConfigurationException to be thrown.
lineThe line number within the configuration file at which this T:System.Configuration.ConfigurationException was thrown.

Definition at line 120 of file ConfigurationException.cs.

◆ ConfigurationException() [8/8]

System.Configuration.ConfigurationException.ConfigurationException ( string  message,
Exception  inner,
string  filename,
int  line 
)

Initializes a new instance of the T:System.Configuration.ConfigurationException class.

Parameters
messageA message describing why this T:System.Configuration.ConfigurationException exception was thrown.
innerThe inner exception that caused this T:System.Configuration.ConfigurationException to be thrown, if any.
filenameThe path to the configuration file that caused this T:System.Configuration.ConfigurationException to be thrown.
lineThe line number within the configuration file at which this T:System.Configuration.ConfigurationException was thrown.

Definition at line 131 of file ConfigurationException.cs.

Member Function Documentation

◆ GetObjectData()

override void System.Configuration.ConfigurationException.GetObjectData ( SerializationInfo  info,
StreamingContext  context 
)
virtual

Sets the T:System.Runtime.Serialization.SerializationInfo object with the file name and line number at which this configuration exception occurred.

Parameters
infoThe object that holds the information to be serialized.
contextThe contextual information about the source or destination.

Reimplemented from System.Exception.

Definition at line 141 of file ConfigurationException.cs.

◆ GetXmlNodeFilename()

static string System.Configuration.ConfigurationException.GetXmlNodeFilename ( XmlNode  node)
static

Gets the path to the configuration file from which the internal T:System.Xml.XmlNode object was loaded when this configuration exception was thrown.

Parameters
nodeThe T:System.Xml.XmlNode that caused this T:System.Configuration.ConfigurationException exception to be thrown.
Returns
A string representing the node file name.

Definition at line 152 of file ConfigurationException.cs.

◆ GetXmlNodeLineNumber()

static int System.Configuration.ConfigurationException.GetXmlNodeLineNumber ( XmlNode  node)
static

Gets the line number within the configuration file that the internal T:System.Xml.XmlNode object represented when this configuration exception was thrown.

Parameters
nodeThe T:System.Xml.XmlNode that caused this T:System.Configuration.ConfigurationException exception to be thrown.
Returns
An int representing the node line number.

Definition at line 161 of file ConfigurationException.cs.

Member Data Documentation

◆ BareMessage

virtual string System.Configuration.ConfigurationException.BareMessage => base.Message

Gets a description of why this configuration exception was thrown.

Returns
A description of why this T:System.Configuration.ConfigurationException exception was thrown.

Definition at line 46 of file ConfigurationException.cs.

◆ Filename

virtual string System.Configuration.ConfigurationException.Filename => SafeFilename(_filename)

Gets the path to the configuration file that caused this configuration exception to be thrown.

Returns
The path to the configuration file that caused this T:System.Configuration.ConfigurationException exception to be thrown.

Definition at line 50 of file ConfigurationException.cs.

◆ Line

virtual int System.Configuration.ConfigurationException.Line => _line

Gets the line number within the configuration file at which this configuration exception was thrown.

Returns
The line number within the configuration file at which this T:System.Configuration.ConfigurationException exception was thrown.

Definition at line 54 of file ConfigurationException.cs.

Property Documentation

◆ Message

override string System.Configuration.ConfigurationException.Message
get

Gets an extended description of why this configuration exception was thrown.

Returns
An extended description of why this T:System.Configuration.ConfigurationException exception was thrown.

Definition at line 24 of file ConfigurationException.cs.


The documentation for this class was generated from the following file: