mscorlib(4.0.0.0) API with additions
|
Represents errors that occur during application execution.To browse the .NET Framework source code for this type, see the Reference Source. More...
Public Member Functions | |
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... | |
virtual void | GetObjectData (SerializationInfo info, StreamingContext context) |
When overridden in a derived class, sets the T:System.Runtime.Serialization.SerializationInfo with information about the exception. More... | |
new Type | GetType () |
Gets the runtime type of the current instance. More... | |
![]() | |
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... | |
Protected Member Functions | |
Exception (SerializationInfo info, StreamingContext context) | |
Initializes a new instance of the T:System.Exception class with serialized data. More... | |
Properties | |
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< SafeSerializationEventArgs > | SerializeObjectState |
Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. More... | |
![]() | |
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... | |
Represents errors that occur during application execution.To browse the .NET Framework source code for this type, see the Reference Source.
Definition at line 22 of file Exception.cs.
System.Exception.Exception | ( | ) |
Initializes a new instance of the T:System.Exception class.
Definition at line 286 of file Exception.cs.
System.Exception.Exception | ( | string | message | ) |
Initializes a new instance of the T:System.Exception class with a specified error message.
message | The message that describes the error. |
Definition at line 294 of file Exception.cs.
System.Exception.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.
message | The error message that explains the reason for the exception. |
innerException | The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic) if no inner exception is specified. |
Definition at line 304 of file Exception.cs.
|
protected |
Initializes a new instance of the T:System.Exception class with serialized data.
info | The T:System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown. |
context | The T:System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination. |
T:System.ArgumentNullException | The info parameter is null . |
T:System.Runtime.Serialization.SerializationException | The class name is null or P:System.Exception.HResult is zero (0). |
Definition at line 317 of file Exception.cs.
|
virtual |
When overridden in a derived class, returns the T:System.Exception that is the root cause of one or more subsequent exceptions.
Nothing
in Visual Basic), this property returns the current exception.Implements System.Runtime.InteropServices._Exception.
Reimplemented in System.AggregateException.
Definition at line 395 of file Exception.cs.
|
virtual |
When overridden in a derived class, sets the T:System.Runtime.Serialization.SerializationInfo with information about the exception.
info | The T:System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown. |
context | The T:System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination. |
T:System.ArgumentNullException | The info parameter is a null reference (Nothing in Visual Basic). |
Implements System.Runtime.InteropServices._Exception.
Reimplemented in System.Security.SecurityException, System.BadImageFormatException, System.IO.FileNotFoundException, System.AggregateException, System.IO.FileLoadException, System.Net.WebSockets.WebSocketException, System.Globalization.CultureNotFoundException, System.Net.Mail.SmtpException, System.TypeLoadException, System.Configuration.ConfigurationException, System.Net.WebException, System.ComponentModel.Win32Exception, System.Security.HostProtectionException, System.ArgumentOutOfRangeException, System.Xml.XmlException, System.ArgumentException, System.MissingMemberException, System.Diagnostics.Eventing.Reader.EventLogException, System.ObjectDisposedException, System.Xml.Schema.XmlSchemaException, System.Net.Mail.SmtpFailedRecipientsException, System.Reflection.ReflectionTypeLoadException, System.Net.Mail.SmtpFailedRecipientException, System.NotFiniteNumberException, System.Xml.Xsl.XsltException, System.ComponentModel.WarningException, System.ComponentModel.LicenseException, System.TypeInitializationException, System.Security.Principal.IdentityNotMappedException, System.Xml.XPath.XPathException, System.Security.AccessControl.PrivilegeNotHeldException, System.Net.CookieException, System.Net.ProtocolViolationException, System.Xml.Schema.XmlSchemaValidationException, System.Runtime.CompilerServices.RuntimeWrappedException, System.Xml.Xsl.XsltCompileException, and System.Xml.Schema.XmlSchemaInferenceException.
Definition at line 576 of file Exception.cs.
new Type System.Exception.GetType | ( | ) |
Gets the runtime type of the current instance.
Implements System.Runtime.InteropServices._Exception.
Definition at line 753 of file Exception.cs.
override string System.Exception.ToString | ( | ) |
Creates and returns a string representation of the current exception.
Implements System.Runtime.InteropServices._Exception.
Definition at line 474 of file Exception.cs.
|
get |
Gets a collection of key/value pairs that provide additional user-defined information about the exception.
Definition at line 115 of file Exception.cs.
|
getset |
Gets or sets a link to the help file associated with this exception.
Definition at line 174 of file Exception.cs.
|
getprotected set |
Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception.
Definition at line 236 of file Exception.cs.
|
get |
Gets the T:System.Exception instance that caused the current exception.
null
if the inner exception value was not supplied to the constructor. This property is read-only.Definition at line 139 of file Exception.cs.
|
get |
Gets a message that describes the current exception.
Definition at line 95 of file Exception.cs.
|
addremoveprotected |
Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception.
Definition at line 260 of file Exception.cs.
|
getset |
Gets or sets the name of the application or the object that causes the error.
T:System.ArgumentException | The object must be a runtime N:System.Reflection object |
Definition at line 192 of file Exception.cs.
|
get |
Gets a string representation of the immediate frames on the call stack.
Definition at line 162 of file Exception.cs.
|
get |
Gets the method that throws the current exception.
Definition at line 150 of file Exception.cs.