diff options
author | dwight <dwight@Dwights-MacBook-2.local> | 2009-08-17 17:33:29 -0400 |
---|---|---|
committer | dwight <dwight@Dwights-MacBook-2.local> | 2009-08-17 17:33:29 -0400 |
commit | 4b4efd2e484eea4eae2b48d469b78a0c3ea041c7 (patch) | |
tree | 90e123a63f928caafbd7082e957bcbcac3291430 | |
parent | bc50b778cf366128823a2cbf03fdc5b0059cbf1e (diff) | |
parent | 66d2680083801902cd1ca61f449e4f7a225b99d9 (diff) | |
download | mongo-4b4efd2e484eea4eae2b48d469b78a0c3ea041c7.tar.gz |
Merge branch 'master' of git@github.com:mongodb/mongo
-rw-r--r-- | shell/utils.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/shell/utils.js b/shell/utils.js index 63534140720..37f2923a24d 100644 --- a/shell/utils.js +++ b/shell/utils.js @@ -306,9 +306,17 @@ printjson = function(x){ } shellPrintHelper = function( x ){ - - if ( typeof( x ) == "undefined" ) + + if ( typeof( x ) == "undefined" ){ + + if ( typeof( db ) != "undefined" && db.getLastError ){ + var e = db.getLastError(); + if ( e != null ) + print( e ); + } + return; + } if ( x == null ){ print( "null" ); |