2009-04-08 12:11:34 -04:00
|
|
|
// Test that client gets stack trace on failed invoke
|
|
|
|
|
|
|
|
|
|
f = db.jstests_error2;
|
|
|
|
|
|
|
|
|
|
f.drop();
|
|
|
|
|
|
2016-03-09 12:17:50 -05:00
|
|
|
f.save({a: 1});
|
2009-04-08 12:11:34 -04:00
|
|
|
|
2016-03-09 12:17:50 -05:00
|
|
|
assert.throws(function() {
|
|
|
|
|
c = f.find({
|
|
|
|
|
$where: function() {
|
|
|
|
|
return a();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
c.next();
|
|
|
|
|
});
|
2009-04-08 12:11:34 -04:00
|
|
|
|
2016-03-09 12:17:50 -05:00
|
|
|
assert.throws(function() {
|
|
|
|
|
db.eval(function() {
|
|
|
|
|
return a();
|
|
|
|
|
});
|
|
|
|
|
});
|