summaryrefslogtreecommitdiff
path: root/modules/mono/editor/GodotTools/GodotTools.IdeMessaging/Utils
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/GodotTools/GodotTools.IdeMessaging/Utils
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/GodotTools/GodotTools.IdeMessaging/Utils')
-rw-r--r--modules/mono/editor/GodotTools/GodotTools.IdeMessaging/Utils/NotifyAwaiter.cs6
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/mono/editor/GodotTools/GodotTools.IdeMessaging/Utils/NotifyAwaiter.cs b/modules/mono/editor/GodotTools/GodotTools.IdeMessaging/Utils/NotifyAwaiter.cs
index d84a63c83c..a285d5fa97 100644
--- a/modules/mono/editor/GodotTools/GodotTools.IdeMessaging/Utils/NotifyAwaiter.cs
+++ b/modules/mono/editor/GodotTools/GodotTools.IdeMessaging/Utils/NotifyAwaiter.cs
@@ -21,14 +21,14 @@ namespace GodotTools.IdeMessaging.Utils
public void OnCompleted(Action continuation)
{
if (this.continuation != null)
- throw new InvalidOperationException("This awaiter has already been listened");
+ throw new InvalidOperationException("This awaiter already has a continuation.");
this.continuation = continuation;
}
public void SetResult(T result)
{
if (IsCompleted)
- throw new InvalidOperationException("This awaiter is already completed");
+ throw new InvalidOperationException("This awaiter is already completed.");
IsCompleted = true;
this.result = result;
@@ -39,7 +39,7 @@ namespace GodotTools.IdeMessaging.Utils
public void SetException(Exception exception)
{
if (IsCompleted)
- throw new InvalidOperationException("This awaiter is already completed");
+ throw new InvalidOperationException("This awaiter is already completed.");
IsCompleted = true;
this.exception = exception;