Explorar el Código

Intercepting option parsing exceptions

Sebastien Ros hace 9 años
padre
commit
c5216f63d1
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  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)