3 // Copyright (c) Microsoft Corporation. All rights reserved.
7 // <OWNER>Microsoft</OWNER>
8 /*=============================================================================
10 ** Class: ThreadAbortException
13 ** Purpose: An exception class which is thrown into a thread to cause it to
14 ** abort. This is a special non-catchable exception and results in
15 ** the thread's death. This is thrown by the VM only and can NOT be
16 ** thrown by any user thread, and subclassing this is useless.
19 =============================================================================*/
21 namespace System
.Threading
24 using System
.Runtime
.Serialization
;
25 using System
.Runtime
.CompilerServices
;
27 [System
.Runtime
.InteropServices
.ComVisible(true)]
29 public sealed class ThreadAbortException
: SystemException
31 private ThreadAbortException()
32 : base(GetMessageFromNativeResources(ExceptionMessageKind
.ThreadAbort
))
34 SetErrorCode(__HResults
.COR_E_THREADABORTED
);
37 //required for serialization
38 internal ThreadAbortException(SerializationInfo info
, StreamingContext context
)
43 public Object ExceptionState
45 [System
.Security
.SecuritySafeCritical
] // auto-generated
46 get {return Thread.CurrentThread.AbortReason;}