Skip to content
Snippets Groups Projects
Commit c6515aa6 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Wrap the body of parse_command() in a try/catch to turn errors into warnings

As requested by Keyop in #synchrob0yyz
parent b286aa74
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4724 passed
......@@ -647,6 +647,7 @@ function handle_command(command, args, defs)
function parse_command(line)
{
try {
function execute_line(args) {
if(args.length >= 2) {
command=args[1].toUpperCase();
......@@ -771,6 +772,9 @@ function parse_command(line)
send_updates();
return(execute_line(parse_line()));
} catch(error) {
log(LOG_WARNING, "Exception during command parsing: " + error);
}
}
// Command handling functions
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment