summaryrefslogtreecommitdiff
path: root/jstests/core/error2.js
blob: 6f0b95bc17e6d38a4c4bef124f0a060581c439b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Test that client gets stack trace on failed invoke

f = db.jstests_error2;

f.drop();

f.save({a: 1});

assert.throws(function() {
    c = f.find({
        $where: function() {
            return a();
        }
    });
    c.next();
});

assert.throws(function() {
    db.eval(function() {
        return a();
    });
});