{"action":"created","issue":{"url":"https://api.github.com/repos/CSharpAnalyzers/ExceptionalReSharper/issues/44","repository_url":"https://api.github.com/repos/CSharpAnalyzers/ExceptionalReSharper","labels_url":"https://api.github.com/repos/CSharpAnalyzers/ExceptionalReSharper/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/CSharpAnalyzers/ExceptionalReSharper/issues/44/comments","events_url":"https://api.github.com/repos/CSharpAnalyzers/ExceptionalReSharper/issues/44/events","html_url":"https://github.com/CSharpAnalyzers/ExceptionalReSharper/issues/44","id":185018302,"number":44,"title":"catch/rethrow of Exception leads to seemingly inappropriate messages","user":{"login":"rwv37","id":8065473,"avatar_url":"https://avatars.githubusercontent.com/u/8065473?v=3","gravatar_id":"","url":"https://api.github.com/users/rwv37","html_url":"https://github.com/rwv37","followers_url":"https://api.github.com/users/rwv37/followers","following_url":"https://api.github.com/users/rwv37/following{/other_user}","gists_url":"https://api.github.com/users/rwv37/gists{/gist_id}","starred_url":"https://api.github.com/users/rwv37/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwv37/subscriptions","organizations_url":"https://api.github.com/users/rwv37/orgs","repos_url":"https://api.github.com/users/rwv37/repos","events_url":"https://api.github.com/users/rwv37/events{/privacy}","received_events_url":"https://api.github.com/users/rwv37/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-10-25T04:49:56Z","updated_at":"2016-12-16T08:23:23Z","closed_at":null,"body":"If you catch Exception just to try to do some logging or something, and then rethrow it, you get several messages from Exceptional, none of which seem terribly appropriate in this particular type of usage.  \n\nAdditionally, and I think more importantly, you can't suppress them.  But I'll open that up as another ticket.\n\nExample:\n\n```\n    public void Blah()\n    {\n        try\n        {\n            Console.WriteLine(\"Doing something\");\n        }\n        catch (Exception e)\n        {\n            Console.WriteLine(\"Oh no! \" + e.Message);\n            throw;\n        }\n```\n\nThat gets:\n\n(1) Usage of catch-all clauses is not recommended\n(2) Exception 'Exception' is not documented\n(3) Throwing 'System.Exception' is not recommended\n"},"comment":{"url":"https://api.github.com/repos/CSharpAnalyzers/ExceptionalReSharper/issues/comments/267541855","html_url":"https://github.com/CSharpAnalyzers/ExceptionalReSharper/issues/44#issuecomment-267541855","issue_url":"https://api.github.com/repos/CSharpAnalyzers/ExceptionalReSharper/issues/44","id":267541855,"user":{"login":"cmeeren","id":7766733,"avatar_url":"https://avatars.githubusercontent.com/u/7766733?v=3","gravatar_id":"","url":"https://api.github.com/users/cmeeren","html_url":"https://github.com/cmeeren","followers_url":"https://api.github.com/users/cmeeren/followers","following_url":"https://api.github.com/users/cmeeren/following{/other_user}","gists_url":"https://api.github.com/users/cmeeren/gists{/gist_id}","starred_url":"https://api.github.com/users/cmeeren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmeeren/subscriptions","organizations_url":"https://api.github.com/users/cmeeren/orgs","repos_url":"https://api.github.com/users/cmeeren/repos","events_url":"https://api.github.com/users/cmeeren/events{/privacy}","received_events_url":"https://api.github.com/users/cmeeren/received_events","type":"User","site_admin":false},"created_at":"2016-12-16T08:23:23Z","updated_at":"2016-12-16T08:23:23Z","body":"Referring to the OPs list, my (admittedly not that experienced) opinion is this:\r\n\r\n> (1) Usage of catch-all clauses is not recommended\r\n\r\nThis **should not** be shown as long as you re-throw using `throw;`, which means the exception will continue to propagate upwards.\r\n\r\n> (2) Exception 'Exception' is not documented\r\n\r\nThis **should** be shown, since you are, potentially, throwing (or passing on) any type of exception, including `System.Expection`.\r\n\r\n> (3) Throwing 'System.Exception' is not recommended\r\n\r\nThis **should not** be shown, since (correct me if I'm wrong) by using `throw;` you're not really throwing `Exception`, you're passing on whatever exception comes your way. And if that happens to be `System.Exception`, then this catch-rethrow block is not where the error is."}}
{"actor":{"display_login":"cmeeren"}}