diff options
author | dwight <dwight@Dwights-MacBook-2.local> | 2009-02-08 16:02:48 -0500 |
---|---|---|
committer | dwight <dwight@Dwights-MacBook-2.local> | 2009-02-08 16:02:48 -0500 |
commit | d45688ce1d0440c4b40bcf51e98f5338d15b4a9d (patch) | |
tree | 71c15cc2bd1d7dd3233391077034ba5e32290322 /client/examples | |
parent | 7892e1771526827ba2d447e111eab181c11da5fc (diff) | |
download | mongo-d45688ce1d0440c4b40bcf51e98f5338d15b4a9d.tar.gz |
fix thorwing of exception wasn't right (dbclientconnection)
Diffstat (limited to 'client/examples')
-rw-r--r-- | client/examples/tutorial.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/client/examples/tutorial.cpp b/client/examples/tutorial.cpp index 801c890dd00..e545632a20a 100644 --- a/client/examples/tutorial.cpp +++ b/client/examples/tutorial.cpp @@ -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; |