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";