Added OperationErrors opposed to returning literal strings

This commit is contained in:
n1073645 2019-12-05 09:28:41 +00:00
parent abb2312d95
commit 6d3ed149d8
2 changed files with 3 additions and 3 deletions

View file

@ -163,7 +163,7 @@ class RegularExpression extends Operation {
case "List matches with capture groups":
return Utils.escapeHtml(regexList(input, regex, displayTotal, true, true));
default:
return "Error: Invalid output format";
throw new OperationError("Error: Invalid output format");
}
} catch (err) {
throw new OperationError("Invalid regex. Details: " + err.message);