diff --git a/ShiftOS_TheReturn/Commands.cs b/ShiftOS_TheReturn/Commands.cs index 4571387..9822c1c 100644 --- a/ShiftOS_TheReturn/Commands.cs +++ b/ShiftOS_TheReturn/Commands.cs @@ -286,7 +286,6 @@ namespace ShiftOS.Engine { } } - [Command("help", "{COMMAND_HELP_USAGE}", "{COMMAND_HELP_DESCRIPTION}")] public static bool Help() { var asm = Assembly.GetExecutingAssembly(); diff --git a/ShiftOS_TheReturn/Resources/strings_en.txt b/ShiftOS_TheReturn/Resources/strings_en.txt index 6cd1be0..c42edab 100644 --- a/ShiftOS_TheReturn/Resources/strings_en.txt +++ b/ShiftOS_TheReturn/Resources/strings_en.txt @@ -175,6 +175,7 @@ If a system file is deleted by the virus scanner, it will be replaced.", "{COMMAND_DEV_MULTARG_DESCRIPTION}":"A command which requiers multiple arguments", "{ERR_COMMAND_NOT_FOUND}":"Command not found.", + "{ERROR_EXCEPTION_THROWN_IN_METHOD}":"An error occurred within the command. Error details:", "{MUD_ERROR}":"MUD error", "{PROLOGUE_NO_USER_DETECTED}":"No user detected. Please enter a username.", diff --git a/ShiftOS_TheReturn/TerminalBackend.cs b/ShiftOS_TheReturn/TerminalBackend.cs index 70cb25d..bba5510 100644 --- a/ShiftOS_TheReturn/TerminalBackend.cs +++ b/ShiftOS_TheReturn/TerminalBackend.cs @@ -210,6 +210,13 @@ namespace ShiftOS.Engine { return (bool)method.Invoke(null, new[] { args }); } + catch (TargetInvocationException e) + { + Console.WriteLine(Localization.Parse("{ERROR_EXCEPTION_THROWN_IN_METHOD}")); + Console.WriteLine(e.InnerException.Message); + Console.WriteLine(e.InnerException.StackTrace); + return true; + } catch { return (bool)method.Invoke(null, new object[] { });