From: Jean-Christophe Beaupré Date: Wed, 29 Oct 2014 18:54:03 +0000 (-0400) Subject: neo4j: Print an error message when the server is down. X-Git-Tag: v0.6.10~6^2 X-Git-Url: http://nitlanguage.org neo4j: Print an error message when the server is down. Show the message as expected. Signed-off-by: Jean-Christophe Beaupré --- diff --git a/lib/neo4j/neo4j.nit b/lib/neo4j/neo4j.nit index 385b966..6629b80 100644 --- a/lib/neo4j/neo4j.nit +++ b/lib/neo4j/neo4j.nit @@ -115,9 +115,8 @@ class Neo4jClient init(base_url: String) do self.base_url = base_url var root = service_root - if not root isa JsonObject then - print "Neo4jClientError: cannot connect to server at {base_url}" - abort + assert root isa JsonObject else + sys.stderr.write "Neo4jClientError: cannot connect to server at <{base_url}>.\n" end self.node_url = root["node"].to_s self.batch_url = root["batch"].to_s