Skip to content

Commit

Permalink
fix - reg - Fixed cryptic OUT123 error messages
Browse files Browse the repository at this point in the history
---

We've fixed a regression where Basolia misreports all output errors as "native method is missing."

---

Type: fix
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Aug 10, 2024
1 parent a62a84f commit 531a3e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BassBoom.Basolia/Exceptions/BasoliaOutException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class BasoliaOutException : Exception
/// <param name="error">An OUT123 error value to use.</param>
internal BasoliaOutException(out123_error error) :
base($"General Basolia output system error\n" +
$"OUT123 returned the following error: [{error} - {Marshal.PtrToStringAnsi(MpgNative.libManagerMpg.GetNativeMethodDelegate<NativeOutputLib.out123_plain_strerror>(nameof(NativeOutputLib.out123_plain_strerror)).Invoke((int)error))}]")
$"OUT123 returned the following error: [{error} - {Marshal.PtrToStringAnsi(MpgNative.libManagerOut.GetNativeMethodDelegate<NativeOutputLib.out123_plain_strerror>(nameof(NativeOutputLib.out123_plain_strerror)).Invoke((int)error))}]")
{ }

/// <summary>
Expand All @@ -45,7 +45,7 @@ internal BasoliaOutException(out123_error error) :
/// <param name="error">An OUT123 error value to use.</param>
internal BasoliaOutException(string message, out123_error error) :
base($"{message}\n" +
$"OUT123 returned the following error: [{error} - {Marshal.PtrToStringAnsi(MpgNative.libManagerMpg.GetNativeMethodDelegate<NativeOutputLib.out123_plain_strerror>(nameof(NativeOutputLib.out123_plain_strerror)).Invoke((int)error))}]")
$"OUT123 returned the following error: [{error} - {Marshal.PtrToStringAnsi(MpgNative.libManagerOut.GetNativeMethodDelegate<NativeOutputLib.out123_plain_strerror>(nameof(NativeOutputLib.out123_plain_strerror)).Invoke((int)error))}]")
{ }

/// <summary>
Expand All @@ -56,7 +56,7 @@ internal BasoliaOutException(string message, out123_error error) :
/// <param name="error">An OUT123 error value to use.</param>
internal BasoliaOutException(string message, Exception innerException, out123_error error) :
base($"{message}\n" +
$"OUT123 returned the following error: [{error} - {Marshal.PtrToStringAnsi(MpgNative.libManagerMpg.GetNativeMethodDelegate<NativeOutputLib.out123_plain_strerror>(nameof(NativeOutputLib.out123_plain_strerror)).Invoke((int)error))}]", innerException)
$"OUT123 returned the following error: [{error} - {Marshal.PtrToStringAnsi(MpgNative.libManagerOut.GetNativeMethodDelegate<NativeOutputLib.out123_plain_strerror>(nameof(NativeOutputLib.out123_plain_strerror)).Invoke((int)error))}]", innerException)
{ }
}
}

0 comments on commit 531a3e7

Please sign in to comment.