diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2015-04-23 17:50:55 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2015-04-23 18:02:53 -0400 |
commit | ab8295bf7cc572a391e8c364b5291f1d9b3b0720 (patch) | |
tree | 440f00fab6ef56747c46bdc995fc41a07aa45845 /src/mongo/dbtests/directclienttests.cpp | |
parent | 1f24d43e419b674bfe866bdebf8224d44fa163b0 (diff) | |
download | mongo-ab8295bf7cc572a391e8c364b5291f1d9b3b0720.tar.gz |
Revert "SERVER-18131 Clean up LastError."
This reverts commit 54c25da33ec7270295c8948f6a51376ec4fd278c and
commit c952a9396a1843aa45d6afa3c6785dec607de112.
Diffstat (limited to 'src/mongo/dbtests/directclienttests.cpp')
-rw-r--r-- | src/mongo/dbtests/directclienttests.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/dbtests/directclienttests.cpp b/src/mongo/dbtests/directclienttests.cpp index fc076a9f926..822db3b58f4 100644 --- a/src/mongo/dbtests/directclienttests.cpp +++ b/src/mongo/dbtests/directclienttests.cpp @@ -33,7 +33,6 @@ #include <iostream> -#include "mongo/db/client.h" #include "mongo/db/db.h" #include "mongo/db/dbdirectclient.h" #include "mongo/db/json.h" @@ -50,11 +49,15 @@ namespace DirectClientTests { class ClientBase { public: ClientBase() { - mongo::LastError::get(cc()).reset(); + _prevError = mongo::lastError._get( false ); + mongo::lastError.release(); + mongo::lastError.reset( new LastError() ); } virtual ~ClientBase() { - mongo::LastError::get(cc()).reset(); + mongo::lastError.reset( _prevError ); } + private: + LastError* _prevError; }; const char *ns = "a.b"; |