2
0
Эх сурвалжийг харах

Intercepting option parsing exceptions

Sebastien Ros 9 жил өмнө
parent
commit
c5216f63d1

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

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