Browse Source

[debugger] handle lookup error, no more need to handle SyntaxErrors

Fedor Indutny 13 years ago
parent
commit
3b593c9ec5
  1. 8
      lib/_debugger.js

8
lib/_debugger.js

@ -283,6 +283,8 @@ Client.prototype.reqScopes = function(cb) {
});
self.reqLookup(refs, function(res) {
if (!res.success) return cb(Error(res.message) || true)
var globals = Object.keys(res.body).map(function(key) {
return res.body[key].properties.map(function(prop) {
return prop.name;
@ -751,11 +753,7 @@ Interface.prototype.debugEval = function(code, context, filename, callback) {
client.reqEval(code, function(res) {
if (!res.success) {
if (res.message) {
if (/SyntaxError/.test(res.message)) {
callback(new SyntaxError(res.message));
} else {
callback(new Error(res.message));
}
callback(res.message);
} else {
callback(null);
}

Loading…
Cancel
Save