Skip to content

Commit

Permalink
hack to display syntax errors. FIXME
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Nov 23, 2010
1 parent 446beeb commit f123a1a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/node_script.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <assert.h>



using namespace v8;
using namespace node;

Expand Down Expand Up @@ -233,6 +234,8 @@ template <node::Script::EvalInputFlags iFlag,
script = oFlag == returnResult ? v8::Script::Compile(code, filename)
: v8::Script::New(code, filename);
if (script.IsEmpty()) {
// FIXME HACK TO DISPLAY SYNTAX ERRORS.
FatalException(try_catch);
// Hack because I can't get a proper stacktrace on SyntaxError
return try_catch.ReThrow();
}
Expand Down

0 comments on commit f123a1a

Please sign in to comment.