Exit with error code on invalid commands and arguments.
This commit is contained in:
committed by
Gustas
parent
fe72dd4140
commit
90a2b677f1
@@ -121,6 +121,7 @@ namespace OpenRA
|
|||||||
{
|
{
|
||||||
Console.WriteLine("Invalid arguments for '{0}'", command);
|
Console.WriteLine("Invalid arguments for '{0}'", command);
|
||||||
GetActionUsage(command, action);
|
GetActionUsage(command, action);
|
||||||
|
Environment.Exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
@@ -130,7 +131,10 @@ namespace OpenRA
|
|||||||
Log.Write("utility", "{0}", e);
|
Log.Write("utility", "{0}", e);
|
||||||
|
|
||||||
if (e is NoSuchCommandException)
|
if (e is NoSuchCommandException)
|
||||||
|
{
|
||||||
Console.WriteLine(e.Message);
|
Console.WriteLine(e.Message);
|
||||||
|
Environment.Exit(1);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Console.WriteLine("Error: Utility application crashed. See utility.log for details");
|
Console.WriteLine("Error: Utility application crashed. See utility.log for details");
|
||||||
|
|||||||
Reference in New Issue
Block a user