Skip to content

Commit 698a472

Browse files
committed
Wrapped OnInvoke in try-catch block
The `OnInvoke(parameters)` method call in the `CommandBridge` namespace in `CommandBase.cs` file has been wrapped in a try-catch block to handle any exceptions that might occur during its execution. If an exception is thrown, it is caught and the exception message is printed to the console.
1 parent 5810751 commit 698a472

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/CommandBridge/CommandBase.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,14 @@ public void Invoke(string[] args)
112112
}
113113

114114
// Invoke the command with the formatted parameters
115-
OnInvoke(parameters);
115+
try
116+
{
117+
OnInvoke(parameters);
118+
}
119+
catch (Exception e)
120+
{
121+
Console.WriteLine(e);
122+
}
116123
}
117124

118125
/// <summary>

0 commit comments

Comments
 (0)