mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-22 18:15:11 +00:00
24 lines
595 B
C#
24 lines
595 B
C#
|
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}.";
|
||
|
}
|
||
|
}
|
||
|
}
|