diff options
Diffstat (limited to 'jstests/core/error2.js')
-rw-r--r-- | jstests/core/error2.js | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/jstests/core/error2.js b/jstests/core/error2.js new file mode 100644 index 00000000000..8c27d6250e1 --- /dev/null +++ b/jstests/core/error2.js @@ -0,0 +1,21 @@ +// 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(); } ); + } +); + |