From cfab6b0566b11ef7bf6d4ee34a5effcc75cf14cf Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Sat, 26 Nov 2022 03:05:00 +0100 Subject: Fix `VariantUtils.UnsupportedType` method throwing This method was not supposed to throw, just return the new constructed exception so it can be thrown by the caller. --- .../GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/mono/glue/GodotSharp') diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs index db84175e17..694da6db77 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/VariantUtils.generic.cs @@ -6,7 +6,7 @@ namespace Godot.NativeInterop; public partial class VariantUtils { - private static Exception UnsupportedType() => throw new InvalidOperationException( + private static Exception UnsupportedType() => new InvalidOperationException( $"The type is not supported for conversion to/from Variant: '{typeof(T).FullName}'"); internal static class GenericConversion -- cgit v1.2.3