UnicornException.cs 482 B

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