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!

Exception Constructor (String, Exception)

Initializes a new instance of the Exception class with its message and its inner exception set as specified.

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

Parameters

message
A message that identifies the reason the exception occurred.
innerException
A reference to the root cause of an exception.

Exceptions

Exception Type Condition
Exception.Message message.
Exception.InnerException innerException

Remarks

Note that the stack trace is not started until the exception is thrown.

All derived classes should provide a constructor with a parameters list identical to the constructor's list.

When handling exceptions, it is sometimes desirable to throw another exception, which is more indicative of the error that has occurred. In order that the original exception with the information that it carries is not lost, exceptions have a field that can hold a reference to another exception.

See Also

Exception Class | Exception Members | System Namespace | Exception Constructor Overload List