summaryrefslogtreecommitdiff
path: root/client/examples
diff options
context:
space:
mode:
authordwight <dwight@Dwights-MacBook-2.local>2009-02-08 16:02:48 -0500
committerdwight <dwight@Dwights-MacBook-2.local>2009-02-08 16:02:48 -0500
commitd45688ce1d0440c4b40bcf51e98f5338d15b4a9d (patch)
tree71c15cc2bd1d7dd3233391077034ba5e32290322 /client/examples
parent7892e1771526827ba2d447e111eab181c11da5fc (diff)
downloadmongo-d45688ce1d0440c4b40bcf51e98f5338d15b4a9d.tar.gz
fix thorwing of exception wasn't right (dbclientconnection)
Diffstat (limited to 'client/examples')
-rw-r--r--client/examples/tutorial.cpp8
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;