Initializes a new instance of the ThreadInterruptedException class with a specified message and the exception that is the root cause of the current exception.
[Visual Basic] Overloads Public Sub New( _ ByVal message As String, _ ByVal innerException As Exception _ ) [C#] public ThreadInterruptedException( string message, Exception innerException ); [C++] public: ThreadInterruptedException( String* message, Exception* innerException ); [JScript] public function ThreadInterruptedException( message : String, innerException : Exception );
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.)
ThreadInterruptedException inherits from the Exception class. This constructor sets the properties of the exception object as follows:
Property Type | Condition |
---|---|
InnerException | The inner exception. |
Message | The message string. |
ThreadInterruptedException Class | ThreadInterruptedException Members | System.Threading Namespace | ThreadInterruptedException Constructor Overload List