aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Memory/MemoryProtectionException.cs
blob: 304ce8ed5a2075aac255b3d16f3edfc7497edf55 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using System;
using System.Runtime.InteropServices;

namespace Ryujinx.Memory
{
    class MemoryProtectionException : Exception
    {
        public MemoryProtectionException()
        {
        }

        public MemoryProtectionException(MemoryPermission permission) : base($"Failed to set memory protection to \"{permission}\": {Marshal.GetLastPInvokeErrorMessage()}")
        {
        }

        public MemoryProtectionException(string message) : base(message)
        {
        }

        public MemoryProtectionException(string message, Exception innerException) : base(message, innerException)
        {
        }
    }
}