summaryrefslogtreecommitdiff
path: root/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2022-08-24 13:54:47 +0200
committerRaul Santos <raulsntos@gmail.com>2022-08-26 16:56:00 +0200
commit79f9f59a87c10bd85c7a31f4b5017bce5bfbbeb1 (patch)
tree26b47308d7f5752abae3dcefe2b3f7fa56721a65 /modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs
parent9876382df8c0fcb7880ca20b053d1f2b2a358785 (diff)
Fix various C# exceptions
- Replace `IndexOutOfRangeException` with `ArgumentOutOfRangeException` - Replace `Exception` with a more specific exception - Add the parameter name to argument exception - Update documentation for methods that throw exceptions - Use `StringBuilder` to build exception messages - Ensure exception messages end with a period
Diffstat (limited to 'modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs')
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs
index 831ac3bdeb..efdd50098e 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs
@@ -16,7 +16,7 @@ namespace Godot.SourceGenerators
INamedTypeSymbol GetTypeByMetadataNameOrThrow(string fullyQualifiedMetadataName)
{
return compilation.GetTypeByMetadataName(fullyQualifiedMetadataName) ??
- throw new InvalidOperationException("Type not found: " + fullyQualifiedMetadataName);
+ throw new InvalidOperationException($"Type not found: '{fullyQualifiedMetadataName}'.");
}
GodotObjectType = GetTypeByMetadataNameOrThrow("Godot.Object");