Permalink
Browse files

Catch JScript syntax errors too

  • Loading branch information...
1 parent acf3f0f commit 33dc778ac2e8f516b36f5ae5f62c05db49b3b18d @josh josh committed Sep 13, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/execjs/external_runtime.rb
@@ -59,7 +59,7 @@ def extract_result(output)
status, value = output.empty? ? [] : MultiJson.decode(output)
if status == "ok"
value
- elsif value == "SyntaxError: Parse error"
+ elsif value =~ /SyntaxError:/
raise RuntimeError, value
else
raise ProgramError, value

0 comments on commit 33dc778

Please sign in to comment.