mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
21 lines
380 B
JavaScript
21 lines
380 B
JavaScript
// Test that client gets stack trace on failed invoke
|
|
|
|
f = db.jstests_error2;
|
|
|
|
f.drop();
|
|
|
|
f.save( {a:1} );
|
|
|
|
c = f.find({$where : function(){ return a() }});
|
|
try {
|
|
c.next();
|
|
} catch( e ) {
|
|
assert( e.match( /java.lang.NullPointerException/ ) );
|
|
}
|
|
|
|
try {
|
|
db.eval( function() { return a(); } );
|
|
} catch ( e ) {
|
|
assert( e.match( /java.lang.NullPointerException/ ) );
|
|
}
|