You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
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
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user