fix thorwing of exception wasn't right (dbclientconnection)

This commit is contained in:
dwight
2009-02-08 16:02:48 -05:00
parent 7892e17715
commit d45688ce1d
3 changed files with 17 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
#include <iostream>
#include "client/dbclient.h"
#include "../../client/dbclient.h"
// g++ -I ../.. -L ../.. tutorial.cpp -lmongoclient -lboost_thread -lboost_filesystem
@@ -7,13 +7,15 @@ using namespace mongo;
void run() {
DBClientConnection c;
c.connect("localhost");
cout << "connected ok" << endl;
}
int main() {
try {
run();
} catch( DBException &e ) {
}
catch( DBException &e ) {
cout << "caught " << e.what() << endl;
}
return 0;