summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordwight <dwight@Dwights-MacBook-2.local>2009-08-17 17:33:29 -0400
committerdwight <dwight@Dwights-MacBook-2.local>2009-08-17 17:33:29 -0400
commit4b4efd2e484eea4eae2b48d469b78a0c3ea041c7 (patch)
tree90e123a63f928caafbd7082e957bcbcac3291430
parentbc50b778cf366128823a2cbf03fdc5b0059cbf1e (diff)
parent66d2680083801902cd1ca61f449e4f7a225b99d9 (diff)
downloadmongo-4b4efd2e484eea4eae2b48d469b78a0c3ea041c7.tar.gz
Merge branch 'master' of git@github.com:mongodb/mongo
-rw-r--r--shell/utils.js12
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" );