repl: don't eval twice when an Error is thrown

This commit is contained in:
Nathan Rajlich 2011-08-31 17:58:00 -07:00 committed by Ben Noordhuis
parent 84cf0c5280
commit cf24f561a3

View File

@ -160,7 +160,11 @@ function REPLServer(prompt, stream) {
'repl');
if (typeof ret !== 'function') success = true;
} catch (e) {
success = false;
if (!(e && e.constructor && e.constructor.name === 'SyntaxError')) {
throw e;
} else {
success = false;
}
}
if (!success) {