~ubuntu-branches/ubuntu/trusty/mongodb/trusty-proposed

« back to all changes in this revision

Viewing changes to jstests/error2.js

  • Committer: Bazaar Package Importer
  • Author(s): Antonin Kral
  • Date: 2010-01-29 19:48:45 UTC
  • Revision ID: james.westby@ubuntu.com-20100129194845-8wbmkf626fwcavc9
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Test that client gets stack trace on failed invoke
 
2
 
 
3
f = db.jstests_error2;
 
4
 
 
5
f.drop();
 
6
 
 
7
f.save( {a:1} );
 
8
 
 
9
assert.throws( 
 
10
    function(){
 
11
        c = f.find({$where : function(){ return a() }});
 
12
        c.next();
 
13
    }
 
14
);
 
15
 
 
16
assert.throws(
 
17
    function(){
 
18
        db.eval( function() { return a(); } );
 
19
    }
 
20
);
 
21