You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-14 13:41:12 +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:
@@ -15,7 +15,7 @@ namespace GodotTools.ProjectEditor
|
||||
public static ProjectRootElement GenGameProject(string name)
|
||||
{
|
||||
if (name.Length == 0)
|
||||
throw new ArgumentException("Project name is empty", nameof(name));
|
||||
throw new ArgumentException("Project name is empty.", nameof(name));
|
||||
|
||||
var root = ProjectRootElement.Create(NewProjectFileOptions.None);
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace GodotTools.ProjectEditor
|
||||
public static string GenAndSaveGameProject(string dir, string name)
|
||||
{
|
||||
if (name.Length == 0)
|
||||
throw new ArgumentException("Project name is empty", nameof(name));
|
||||
throw new ArgumentException("Project name is empty.", nameof(name));
|
||||
|
||||
string path = Path.Combine(dir, name + ".csproj");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user