From 531a3e7f9a8cddbfda200de921cac7a92bfd94a4 Mon Sep 17 00:00:00 2001 From: Aptivi CEO Date: Sat, 10 Aug 2024 20:01:19 +0300 Subject: [PATCH] fix - reg - Fixed cryptic OUT123 error messages --- 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 --- BassBoom.Basolia/Exceptions/BasoliaOutException.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BassBoom.Basolia/Exceptions/BasoliaOutException.cs b/BassBoom.Basolia/Exceptions/BasoliaOutException.cs index e5d35da..258dffc 100644 --- a/BassBoom.Basolia/Exceptions/BasoliaOutException.cs +++ b/BassBoom.Basolia/Exceptions/BasoliaOutException.cs @@ -35,7 +35,7 @@ public class BasoliaOutException : Exception /// An OUT123 error value to use. internal BasoliaOutException(out123_error error) : base($"General Basolia output system error\n" + - $"OUT123 returned the following error: [{error} - {Marshal.PtrToStringAnsi(MpgNative.libManagerMpg.GetNativeMethodDelegate(nameof(NativeOutputLib.out123_plain_strerror)).Invoke((int)error))}]") + $"OUT123 returned the following error: [{error} - {Marshal.PtrToStringAnsi(MpgNative.libManagerOut.GetNativeMethodDelegate(nameof(NativeOutputLib.out123_plain_strerror)).Invoke((int)error))}]") { } /// @@ -45,7 +45,7 @@ internal BasoliaOutException(out123_error error) : /// An OUT123 error value to use. internal BasoliaOutException(string message, out123_error error) : base($"{message}\n" + - $"OUT123 returned the following error: [{error} - {Marshal.PtrToStringAnsi(MpgNative.libManagerMpg.GetNativeMethodDelegate(nameof(NativeOutputLib.out123_plain_strerror)).Invoke((int)error))}]") + $"OUT123 returned the following error: [{error} - {Marshal.PtrToStringAnsi(MpgNative.libManagerOut.GetNativeMethodDelegate(nameof(NativeOutputLib.out123_plain_strerror)).Invoke((int)error))}]") { } /// @@ -56,7 +56,7 @@ internal BasoliaOutException(string message, out123_error error) : /// An OUT123 error value to use. internal BasoliaOutException(string message, Exception innerException, out123_error error) : base($"{message}\n" + - $"OUT123 returned the following error: [{error} - {Marshal.PtrToStringAnsi(MpgNative.libManagerMpg.GetNativeMethodDelegate(nameof(NativeOutputLib.out123_plain_strerror)).Invoke((int)error))}]", innerException) + $"OUT123 returned the following error: [{error} - {Marshal.PtrToStringAnsi(MpgNative.libManagerOut.GetNativeMethodDelegate(nameof(NativeOutputLib.out123_plain_strerror)).Invoke((int)error))}]", innerException) { } } }