mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-30 17:16:25 +02:00
24 lines
No EOL
595 B
C#
24 lines
No EOL
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}.";
|
|
}
|
|
}
|
|
} |