summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2009-07-24 16:07:37 +0000
committerdeva <deva>2009-07-24 16:07:37 +0000
commit2d39b7295c9f5076c80d6928aee5e18f9069d03d (patch)
tree0eaf3decfd62b6038442d396d1bedf2f9c702c62
parent680c646011ec55dd4c639a5b61d8c42a10272ae2 (diff)
Test for a running instance of the artefact server.
-rw-r--r--server/src/queryhandlerpentominos.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/src/queryhandlerpentominos.cc b/server/src/queryhandlerpentominos.cc
index f70033d..ffa0946 100644
--- a/server/src/queryhandlerpentominos.cc
+++ b/server/src/queryhandlerpentominos.cc
@@ -233,7 +233,13 @@ QueryResult QueryHandlerPentominos::exec(Query &query)
int main()
{
TCPSocket s;
- s.connect("localhost", 11108);
+ try {
+ s.connect("localhost", 11108);
+ } catch(Exception &e) {
+ printf("ERROR: %s\n", e.what());
+ printf("A running instance of the artefact server in needed on localhost, port 11108 in order for this test to run.\n");
+ return 1;
+ }
QueryHandlerPentominos qh(&s, "2003791613");