From 17def48271b1116cc9d0104b5e6d0a2c129b9436 Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Sun, 3 Dec 2023 13:07:28 +0100 Subject: [PATCH] Changed invalid regex error message --- svr.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/svr.js b/svr.js index fb03005..cb70654 100644 --- a/svr.js +++ b/svr.js @@ -543,7 +543,7 @@ function getOS() { function createRegex(regex, isPath) { var regexStrMatch = regex.match(/^\/((?:\\.|[^\/\\])*)\/([a-zA-Z0-9]*)$/); - if (!regexStrMatch) throw new Error("Invalid regex!"); + if (!regexStrMatch) throw new Error("Invalid regular expression: " + regex); var searchString = regexStrMatch[1]; var modifiers = regexStrMatch[2]; if (isPath && !modifiers.match(/i/i) && os.platform() == "win32") modifiers += "i";