{"action":"created","comment":{"url":"https://api.github.com/repos/neo4j/cypher-shell/pulls/comments/78593905","id":78593905,"diff_hunk":"@@ -23,6 +24,8 @@ public static void main(String[] args) {\n             System.exit(1);\n         }\n \n+        setDebug(cliArgs.getDebugMode());","path":"cypher-shell/src/main/java/org/neo4j/shell/Main.java","position":12,"original_position":12,"commit_id":"1b86853577296867832e04b8ec1fd69e6bf86abc","original_commit_id":"1b86853577296867832e04b8ec1fd69e6bf86abc","user":{"login":"praveenag","id":339793,"avatar_url":"https://avatars.githubusercontent.com/u/339793?v=3","gravatar_id":"","url":"https://api.github.com/users/praveenag","html_url":"https://github.com/praveenag","followers_url":"https://api.github.com/users/praveenag/followers","following_url":"https://api.github.com/users/praveenag/following{/other_user}","gists_url":"https://api.github.com/users/praveenag/gists{/gist_id}","starred_url":"https://api.github.com/users/praveenag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/praveenag/subscriptions","organizations_url":"https://api.github.com/users/praveenag/orgs","repos_url":"https://api.github.com/users/praveenag/repos","events_url":"https://api.github.com/users/praveenag/events{/privacy}","received_events_url":"https://api.github.com/users/praveenag/received_events","type":"User","site_admin":false},"body":"I think the `debug` functionality fundamentally alters the state of how runners execute statements. Doing this over static method seems that it could change the state anywhere, ideally I'd like it to be done as part of a constructor instead of a static method. Thereby making Helper a class with states instead of a collection of static methods.","created_at":"2016-09-13T16:21:46Z","updated_at":"2016-09-13T16:21:46Z","html_url":"https://github.com/neo4j/cypher-shell/pull/41#discussion_r78593905","pull_request_url":"https://api.github.com/repos/neo4j/cypher-shell/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/neo4j/cypher-shell/pulls/comments/78593905"},"html":{"href":"https://github.com/neo4j/cypher-shell/pull/41#discussion_r78593905"},"pull_request":{"href":"https://api.github.com/repos/neo4j/cypher-shell/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/neo4j/cypher-shell/pulls/41","id":84868783,"html_url":"https://github.com/neo4j/cypher-shell/pull/41","diff_url":"https://github.com/neo4j/cypher-shell/pull/41.diff","patch_url":"https://github.com/neo4j/cypher-shell/pull/41.patch","issue_url":"https://api.github.com/repos/neo4j/cypher-shell/issues/41","number":41,"state":"open","locked":false,"title":"Add a `--debug` flag","user":{"login":"spacecowboy","id":223655,"avatar_url":"https://avatars.githubusercontent.com/u/223655?v=3","gravatar_id":"","url":"https://api.github.com/users/spacecowboy","html_url":"https://github.com/spacecowboy","followers_url":"https://api.github.com/users/spacecowboy/followers","following_url":"https://api.github.com/users/spacecowboy/following{/other_user}","gists_url":"https://api.github.com/users/spacecowboy/gists{/gist_id}","starred_url":"https://api.github.com/users/spacecowboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacecowboy/subscriptions","organizations_url":"https://api.github.com/users/spacecowboy/orgs","repos_url":"https://api.github.com/users/spacecowboy/repos","events_url":"https://api.github.com/users/spacecowboy/events{/privacy}","received_events_url":"https://api.github.com/users/spacecowboy/received_events","type":"User","site_admin":false},"body":"At the moment the only change is that error messages print full stack traces\r\n\r\nNew help text:\r\n\r\n```\r\nusage: cypher-shell [-h] [-a ADDRESS] [-u USERNAME] [-p PASSWORD]\r\n                    [--encryption {true,false}] [--format {verbose,plain}] [--debug]\r\n                    [--fail-fast | --fail-at-end] [cypher]\r\n\r\nA command line shell where you can execute Cypher against an instance of Neo4j\r\n\r\npositional arguments:\r\n  cypher                 an optional string of cypher to execute and then exit\r\n\r\noptional arguments:\r\n  -h, --help             show this help message and exit\r\n  --fail-fast            exit and report failure  on  first  error  when reading from file\r\n                         (this is the default behavior)\r\n  --fail-at-end          exit and report failures at end of input when reading from file\r\n  --format {verbose,plain}\r\n                         desired  output  format,  verbose(default)  displays  statistics,\r\n                         plain only displays data (default: verbose)\r\n  --debug                print additional debug information (default: false)\r\n\r\nconnection arguments:\r\n  -a ADDRESS, --address ADDRESS\r\n                         address and port to connect to (default: localhost:7687)\r\n  -u USERNAME, --username USERNAME\r\n                         username to connect as (default: )\r\n  -p PASSWORD, --password PASSWORD\r\n                         password to connect with (default: )\r\n  --encryption {true,false}\r\n                         whether the connection  to  Neo4j  should  be  encrypted; must be\r\n                         consistent with Neo4j's configuration (default: true)\r\n\r\n```\r\n\r\nAnd example output when debug is enabled:\r\n\r\n```\r\nUnable to connect to localhost:7687, ensure the database is running and that there is a working network connection to it.\r\n\r\norg.neo4j.driver.v1.exceptions.ClientException: Unable to connect to localhost:7687, ensure the database is running and that there is a working network connection to it.\r\n\tat org.neo4j.driver.internal.net.SocketClient.start(SocketClient.java:114)\r\n\tat org.neo4j.driver.internal.net.SocketConnection.<init>(SocketConnection.java:68)\r\n\tat org.neo4j.driver.internal.net.pooling.SocketConnectionPool.connect(SocketConnectionPool.java:83)\r\n\tat org.neo4j.driver.internal.net.pooling.SocketConnectionPool.acquire(SocketConnectionPool.java:116)\r\n\tat org.neo4j.driver.internal.DirectDriver.session(DirectDriver.java:48)\r\n\tat org.neo4j.shell.state.BoltStateHandler.connect(BoltStateHandler.java:108)\r\n\tat org.neo4j.shell.CypherShell.connect(CypherShell.java:112)\r\n\tat org.neo4j.shell.Main.startShell(Main.java:51)\r\n\tat org.neo4j.shell.Main.main(Main.java:30)\r\n```","created_at":"2016-09-12T13:14:24Z","updated_at":"2016-09-13T16:21:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"11b257afea429647edadf78724cbc2bcd0812670","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/neo4j/cypher-shell/pulls/41/commits","review_comments_url":"https://api.github.com/repos/neo4j/cypher-shell/pulls/41/comments","review_comment_url":"https://api.github.com/repos/neo4j/cypher-shell/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neo4j/cypher-shell/issues/41/comments","statuses_url":"https://api.github.com/repos/neo4j/cypher-shell/statuses/1b86853577296867832e04b8ec1fd69e6bf86abc","head":{"label":"spacecowboy:debugmode","ref":"debugmode","sha":"1b86853577296867832e04b8ec1fd69e6bf86abc","user":{"login":"spacecowboy","id":223655,"avatar_url":"https://avatars.githubusercontent.com/u/223655?v=3","gravatar_id":"","url":"https://api.github.com/users/spacecowboy","html_url":"https://github.com/spacecowboy","followers_url":"https://api.github.com/users/spacecowboy/followers","following_url":"https://api.github.com/users/spacecowboy/following{/other_user}","gists_url":"https://api.github.com/users/spacecowboy/gists{/gist_id}","starred_url":"https://api.github.com/users/spacecowboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacecowboy/subscriptions","organizations_url":"https://api.github.com/users/spacecowboy/orgs","repos_url":"https://api.github.com/users/spacecowboy/repos","events_url":"https://api.github.com/users/spacecowboy/events{/privacy}","received_events_url":"https://api.github.com/users/spacecowboy/received_events","type":"User","site_admin":false},"repo":{"id":63763422,"name":"cypher-shell","full_name":"spacecowboy/cypher-shell","owner":{"login":"spacecowboy","id":223655,"avatar_url":"https://avatars.githubusercontent.com/u/223655?v=3","gravatar_id":"","url":"https://api.github.com/users/spacecowboy","html_url":"https://github.com/spacecowboy","followers_url":"https://api.github.com/users/spacecowboy/followers","following_url":"https://api.github.com/users/spacecowboy/following{/other_user}","gists_url":"https://api.github.com/users/spacecowboy/gists{/gist_id}","starred_url":"https://api.github.com/users/spacecowboy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spacecowboy/subscriptions","organizations_url":"https://api.github.com/users/spacecowboy/orgs","repos_url":"https://api.github.com/users/spacecowboy/repos","events_url":"https://api.github.com/users/spacecowboy/events{/privacy}","received_events_url":"https://api.github.com/users/spacecowboy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spacecowboy/cypher-shell","description":"A command line shell where you can execute Cypher against an instance of Neo4j","fork":true,"url":"https://api.github.com/repos/spacecowboy/cypher-shell","forks_url":"https://api.github.com/repos/spacecowboy/cypher-shell/forks","keys_url":"https://api.github.com/repos/spacecowboy/cypher-shell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spacecowboy/cypher-shell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spacecowboy/cypher-shell/teams","hooks_url":"https://api.github.com/repos/spacecowboy/cypher-shell/hooks","issue_events_url":"https://api.github.com/repos/spacecowboy/cypher-shell/issues/events{/number}","events_url":"https://api.github.com/repos/spacecowboy/cypher-shell/events","assignees_url":"https://api.github.com/repos/spacecowboy/cypher-shell/assignees{/user}","branches_url":"https://api.github.com/repos/spacecowboy/cypher-shell/branches{/branch}","tags_url":"https://api.github.com/repos/spacecowboy/cypher-shell/tags","blobs_url":"https://api.github.com/repos/spacecowboy/cypher-shell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spacecowboy/cypher-shell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spacecowboy/cypher-shell/git/refs{/sha}","trees_url":"https://api.github.com/repos/spacecowboy/cypher-shell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spacecowboy/cypher-shell/statuses/{sha}","languages_url":"https://api.github.com/repos/spacecowboy/cypher-shell/languages","stargazers_url":"https://api.github.com/repos/spacecowboy/cypher-shell/stargazers","contributors_url":"https://api.github.com/repos/spacecowboy/cypher-shell/contributors","subscribers_url":"https://api.github.com/repos/spacecowboy/cypher-shell/subscribers","subscription_url":"https://api.github.com/repos/spacecowboy/cypher-shell/subscription","commits_url":"https://api.github.com/repos/spacecowboy/cypher-shell/commits{/sha}","git_commits_url":"https://api.github.com/repos/spacecowboy/cypher-shell/git/commits{/sha}","comments_url":"https://api.github.com/repos/spacecowboy/cypher-shell/comments{/number}","issue_comment_url":"https://api.github.com/repos/spacecowboy/cypher-shell/issues/comments{/number}","contents_url":"https://api.github.com/repos/spacecowboy/cypher-shell/contents/{+path}","compare_url":"https://api.github.com/repos/spacecowboy/cypher-shell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spacecowboy/cypher-shell/merges","archive_url":"https://api.github.com/repos/spacecowboy/cypher-shell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spacecowboy/cypher-shell/downloads","issues_url":"https://api.github.com/repos/spacecowboy/cypher-shell/issues{/number}","pulls_url":"https://api.github.com/repos/spacecowboy/cypher-shell/pulls{/number}","milestones_url":"https://api.github.com/repos/spacecowboy/cypher-shell/milestones{/number}","notifications_url":"https://api.github.com/repos/spacecowboy/cypher-shell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spacecowboy/cypher-shell/labels{/name}","releases_url":"https://api.github.com/repos/spacecowboy/cypher-shell/releases{/id}","deployments_url":"https://api.github.com/repos/spacecowboy/cypher-shell/deployments","created_at":"2016-07-20T08:15:38Z","updated_at":"2016-07-20T08:15:39Z","pushed_at":"2016-09-13T14:39:51Z","git_url":"git://github.com/spacecowboy/cypher-shell.git","ssh_url":"git@github.com:spacecowboy/cypher-shell.git","clone_url":"https://github.com/spacecowboy/cypher-shell.git","svn_url":"https://github.com/spacecowboy/cypher-shell","homepage":null,"size":524,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"neo4j:master","ref":"master","sha":"fe55e61b6f6790da9741d54ca0f18d64a7e87df6","user":{"login":"neo4j","id":201120,"avatar_url":"https://avatars.githubusercontent.com/u/201120?v=3","gravatar_id":"","url":"https://api.github.com/users/neo4j","html_url":"https://github.com/neo4j","followers_url":"https://api.github.com/users/neo4j/followers","following_url":"https://api.github.com/users/neo4j/following{/other_user}","gists_url":"https://api.github.com/users/neo4j/gists{/gist_id}","starred_url":"https://api.github.com/users/neo4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo4j/subscriptions","organizations_url":"https://api.github.com/users/neo4j/orgs","repos_url":"https://api.github.com/users/neo4j/repos","events_url":"https://api.github.com/users/neo4j/events{/privacy}","received_events_url":"https://api.github.com/users/neo4j/received_events","type":"Organization","site_admin":false},"repo":{"id":61703365,"name":"cypher-shell","full_name":"neo4j/cypher-shell","owner":{"login":"neo4j","id":201120,"avatar_url":"https://avatars.githubusercontent.com/u/201120?v=3","gravatar_id":"","url":"https://api.github.com/users/neo4j","html_url":"https://github.com/neo4j","followers_url":"https://api.github.com/users/neo4j/followers","following_url":"https://api.github.com/users/neo4j/following{/other_user}","gists_url":"https://api.github.com/users/neo4j/gists{/gist_id}","starred_url":"https://api.github.com/users/neo4j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neo4j/subscriptions","organizations_url":"https://api.github.com/users/neo4j/orgs","repos_url":"https://api.github.com/users/neo4j/repos","events_url":"https://api.github.com/users/neo4j/events{/privacy}","received_events_url":"https://api.github.com/users/neo4j/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neo4j/cypher-shell","description":"A command line shell where you can execute Cypher against an instance of Neo4j","fork":false,"url":"https://api.github.com/repos/neo4j/cypher-shell","forks_url":"https://api.github.com/repos/neo4j/cypher-shell/forks","keys_url":"https://api.github.com/repos/neo4j/cypher-shell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neo4j/cypher-shell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neo4j/cypher-shell/teams","hooks_url":"https://api.github.com/repos/neo4j/cypher-shell/hooks","issue_events_url":"https://api.github.com/repos/neo4j/cypher-shell/issues/events{/number}","events_url":"https://api.github.com/repos/neo4j/cypher-shell/events","assignees_url":"https://api.github.com/repos/neo4j/cypher-shell/assignees{/user}","branches_url":"https://api.github.com/repos/neo4j/cypher-shell/branches{/branch}","tags_url":"https://api.github.com/repos/neo4j/cypher-shell/tags","blobs_url":"https://api.github.com/repos/neo4j/cypher-shell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neo4j/cypher-shell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neo4j/cypher-shell/git/refs{/sha}","trees_url":"https://api.github.com/repos/neo4j/cypher-shell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neo4j/cypher-shell/statuses/{sha}","languages_url":"https://api.github.com/repos/neo4j/cypher-shell/languages","stargazers_url":"https://api.github.com/repos/neo4j/cypher-shell/stargazers","contributors_url":"https://api.github.com/repos/neo4j/cypher-shell/contributors","subscribers_url":"https://api.github.com/repos/neo4j/cypher-shell/subscribers","subscription_url":"https://api.github.com/repos/neo4j/cypher-shell/subscription","commits_url":"https://api.github.com/repos/neo4j/cypher-shell/commits{/sha}","git_commits_url":"https://api.github.com/repos/neo4j/cypher-shell/git/commits{/sha}","comments_url":"https://api.github.com/repos/neo4j/cypher-shell/comments{/number}","issue_comment_url":"https://api.github.com/repos/neo4j/cypher-shell/issues/comments{/number}","contents_url":"https://api.github.com/repos/neo4j/cypher-shell/contents/{+path}","compare_url":"https://api.github.com/repos/neo4j/cypher-shell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neo4j/cypher-shell/merges","archive_url":"https://api.github.com/repos/neo4j/cypher-shell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neo4j/cypher-shell/downloads","issues_url":"https://api.github.com/repos/neo4j/cypher-shell/issues{/number}","pulls_url":"https://api.github.com/repos/neo4j/cypher-shell/pulls{/number}","milestones_url":"https://api.github.com/repos/neo4j/cypher-shell/milestones{/number}","notifications_url":"https://api.github.com/repos/neo4j/cypher-shell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neo4j/cypher-shell/labels{/name}","releases_url":"https://api.github.com/repos/neo4j/cypher-shell/releases{/id}","deployments_url":"https://api.github.com/repos/neo4j/cypher-shell/deployments","created_at":"2016-06-22T08:43:36Z","updated_at":"2016-09-05T02:12:47Z","pushed_at":"2016-09-13T15:51:27Z","git_url":"git://github.com/neo4j/cypher-shell.git","ssh_url":"git@github.com:neo4j/cypher-shell.git","clone_url":"https://github.com/neo4j/cypher-shell.git","svn_url":"https://github.com/neo4j/cypher-shell","homepage":null,"size":528,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neo4j/cypher-shell/pulls/41"},"html":{"href":"https://github.com/neo4j/cypher-shell/pull/41"},"issue":{"href":"https://api.github.com/repos/neo4j/cypher-shell/issues/41"},"comments":{"href":"https://api.github.com/repos/neo4j/cypher-shell/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/neo4j/cypher-shell/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/neo4j/cypher-shell/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neo4j/cypher-shell/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/neo4j/cypher-shell/statuses/1b86853577296867832e04b8ec1fd69e6bf86abc"}}}}
{"actor":{"display_login":"praveenag"}}