Example #1
0
 string DBClientWithCommands::getLastError() { 
     BSONObj info = getLastErrorDetailed();
     BSONElement e = info["err"];
     if( e.eoo() ) return "";
     if( e.type() == Object ) return e.toString();
     return e.str();
 }
 BSONObj SyncClusterConnection::getLastErrorDetailed(bool fsync, bool j, int w, int wtimeout) {
     return getLastErrorDetailed("admin", fsync, j, w, wtimeout);
 }
Example #3
0
 string DBClientWithCommands::getLastError() {
     BSONObj info = getLastErrorDetailed();
     return getLastErrorString( info );
 }