0
0
Fork 0
This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
ryujinx-final/Ryujinx.Memory/WindowsShared/WindowsApiException.cs

24 lines
595 B
C#
Raw Normal View History

using System;
namespace Ryujinx.Memory.WindowsShared
{
class WindowsApiException : Exception
{
public WindowsApiException()
{
}
public WindowsApiException(string functionName) : base(CreateMessage(functionName))
{
}
public WindowsApiException(string functionName, Exception inner) : base(CreateMessage(functionName), inner)
{
}
private static string CreateMessage(string functionName)
{
return $"{functionName} returned error code 0x{WindowsApi.GetLastError():X}.";
}
}
}