mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-16 10:05:25 +00:00
15 lines
504 B
C#
15 lines
504 B
C#
|
using System;
|
||
|
using System.Runtime.CompilerServices;
|
||
|
|
||
|
namespace Ryujinx.HLE.Exceptions
|
||
|
{
|
||
|
public class InvalidStructLayoutException<T> : Exception
|
||
|
{
|
||
|
static readonly Type _structType = typeof(T);
|
||
|
|
||
|
public InvalidStructLayoutException(string message) : base(message) {}
|
||
|
|
||
|
public InvalidStructLayoutException(int expectedSize) :
|
||
|
base($"Type {_structType.Name} has the wrong size. Expected: {expectedSize} bytes, Got: {Unsafe.SizeOf<T>()} bytes") {}
|
||
|
}
|
||
|
}
|