{"action":"opened","issue":{"url":"https://api.github.com/repos/playframework/play1/issues/993","repository_url":"https://api.github.com/repos/playframework/play1","labels_url":"https://api.github.com/repos/playframework/play1/issues/993/labels{/name}","comments_url":"https://api.github.com/repos/playframework/play1/issues/993/comments","events_url":"https://api.github.com/repos/playframework/play1/issues/993/events","html_url":"https://github.com/playframework/play1/issues/993","id":165198282,"number":993,"title":"Do not swallow cause of exception","user":{"login":"asolntsev","id":279773,"avatar_url":"https://avatars.githubusercontent.com/u/279773?v=3","gravatar_id":"","url":"https://api.github.com/users/asolntsev","html_url":"https://github.com/asolntsev","followers_url":"https://api.github.com/users/asolntsev/followers","following_url":"https://api.github.com/users/asolntsev/following{/other_user}","gists_url":"https://api.github.com/users/asolntsev/gists{/gist_id}","starred_url":"https://api.github.com/users/asolntsev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asolntsev/subscriptions","organizations_url":"https://api.github.com/users/asolntsev/orgs","repos_url":"https://api.github.com/users/asolntsev/repos","events_url":"https://api.github.com/users/asolntsev/events{/privacy}","received_events_url":"https://api.github.com/users/asolntsev/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-07-12T22:41:14Z","updated_at":"2016-07-12T22:41:14Z","closed_at":null,"body":"We can see the following construction in many places in Play 1 framework:\r\n\r\n```java\r\ntry {\r\n ...\r\n}\r\ncatch (Exception ex) {\r\n  throw new UnexpectedError(\"Could not do something\");\r\n}\r\n```\r\n\r\nSuch code is pretty bad because the original exception `ex` gets lost. \r\n\r\nWe should always re-throw the original exception:\r\n\r\n```java\r\nthrow new UnexpectedError(\"Could not do something\", ex);\r\n```\r\n\r\nor at least log it."}}
{"actor":{"display_login":"asolntsev"}}