Updates referencesource to .NET 4.7
[mono-project.git] / mcs / class / referencesource / mscorlib / system / threading / threadabortexception.cs
blob2c8003d021fd247ec2cb42dc4ae455fee329c114
1 // ==++==
2 //
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 //
5 // ==--==
6 //
7 // <OWNER>Microsoft</OWNER>
8 /*=============================================================================
9 **
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
23 using System;
24 using System.Runtime.Serialization;
25 using System.Runtime.CompilerServices;
27 [System.Runtime.InteropServices.ComVisible(true)]
28 [Serializable]
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)
39 : base(info, context)
43 public Object ExceptionState
45 [System.Security.SecuritySafeCritical] // auto-generated
46 get {return Thread.CurrentThread.AbortReason;}