NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

ExternalException Constructor (String, Exception)

Initializes a new instance of ExternalException with a specified message and the exception that is the root cause of this exception.

[Visual Basic]
Overloads Public Sub New( _
   ByVal message As String, _
   ByVal inner As Exception _
)
[C#]
public ExternalException(
   string message,
   Exception inner
);
[C++]
public: ExternalException(
   String* message,
   Exception* inner
);
[JScript]
public function ExternalException(
   message : String,
   inner : Exception
);

Parameters

message
The message that indicates the reason the exception occurred.
inner
A reference to an exception that is indicative of the problem exception.

Remarks

When handling an exception, it is sometimes helpful to have a reference to the exception(s) that caused the error to occur. You can use this constructor to create a chain of new and more meaningful exceptions with the InnerException property set to the inner exception reference. This more meaningful exception can then be thrown to the caller. Note that with this functionality it is possible to create a series of linked exceptions that terminates with the exception that was first thrown. (See Exception for more information.)

ExternalException inherits from the Exception class. This constructor sets the properties of the Exception object as follows:

Property Value
InnerException The inner exception.
Message The message string.

See Also

ExternalException Class | ExternalException Members | System.Runtime.InteropServices Namespace | ExternalException Constructor Overload List