Browse Source

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.
Raul Santos 2 years ago
parent
commit
cfab6b0566

+ 1 - 1
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<T>() => throw new InvalidOperationException(
+    private static Exception UnsupportedType<T>() => new InvalidOperationException(
         $"The type is not supported for conversion to/from Variant: '{typeof(T).FullName}'");
 
     internal static class GenericConversion<T>