Move portable thread pool to shared partition (dotnet/corert#7828)
[mono-project.git] / netcore / System.Private.CoreLib / shared / System / UnauthorizedAccessException.cs
blob4942eb760c1283bc3a386fafeb7175740c0a6f92
1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
5 /*============================================================
6 **
7 **
8 **
9 ** Purpose: An exception for OS 'access denied' types of
10 ** errors, including IO and limited security types
11 ** of errors.
14 ===========================================================*/
16 using System.Runtime.Serialization;
18 namespace System
20 // The UnauthorizedAccessException is thrown when access errors
21 // occur from IO or other OS methods.
22 [Serializable]
23 [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
24 public class UnauthorizedAccessException : SystemException
26 public UnauthorizedAccessException()
27 : base(SR.Arg_UnauthorizedAccessException)
29 HResult = HResults.COR_E_UNAUTHORIZEDACCESS;
32 public UnauthorizedAccessException(string? message)
33 : base(message)
35 HResult = HResults.COR_E_UNAUTHORIZEDACCESS;
38 public UnauthorizedAccessException(string? message, Exception? inner)
39 : base(message, inner)
41 HResult = HResults.COR_E_UNAUTHORIZEDACCESS;
44 protected UnauthorizedAccessException(SerializationInfo info, StreamingContext context) : base(info, context)