소스 검색

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)