浏览代码

Intercepting option parsing exceptions

Sebastien Ros 9 年之前
父节点
当前提交
c5216f63d1
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      Jint/Native/RegExp/RegExpConstructor.cs

+ 1 - 2
Jint/Native/RegExp/RegExpConstructor.cs

@@ -90,10 +90,9 @@ namespace Jint.Native.RegExp
             r.Prototype = PrototypeObject;
             r.Extensible = true;
 
-            var options = new Scanner("").ParseRegexOptions(f);
-
             try
             {
+                var options = new Scanner("").ParseRegexOptions(f);
                 r.Value = new Regex(p, options);
             }
             catch (Exception e)