UnicornException.cs 509 B

123456789101112131415161718192021222324
  1. using Ryujinx.Tests.Unicorn.Native.Const;
  2. using System;
  3. using System.Runtime.InteropServices;
  4. namespace Ryujinx.Tests.Unicorn
  5. {
  6. public class UnicornException : Exception
  7. {
  8. public readonly Error Error;
  9. internal UnicornException(Error error)
  10. {
  11. Error = error;
  12. }
  13. public override string Message
  14. {
  15. get
  16. {
  17. return Marshal.PtrToStringAnsi(Native.Interface.uc_strerror(Error));
  18. }
  19. }
  20. }
  21. }