{"action":"opened","number":176,"pull_request":{"url":"https://api.github.com/repos/salat/salat/pulls/176","id":82131376,"html_url":"https://github.com/salat/salat/pull/176","diff_url":"https://github.com/salat/salat/pull/176.diff","patch_url":"https://github.com/salat/salat/pull/176.patch","issue_url":"https://api.github.com/repos/salat/salat/issues/176","number":176,"state":"open","locked":false,"title":"Log more errors in case of known deserialization problems (#143)","user":{"login":"noahlz","id":447754,"avatar_url":"https://avatars.githubusercontent.com/u/447754?v=3","gravatar_id":"","url":"https://api.github.com/users/noahlz","html_url":"https://github.com/noahlz","followers_url":"https://api.github.com/users/noahlz/followers","following_url":"https://api.github.com/users/noahlz/following{/other_user}","gists_url":"https://api.github.com/users/noahlz/gists{/gist_id}","starred_url":"https://api.github.com/users/noahlz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noahlz/subscriptions","organizations_url":"https://api.github.com/users/noahlz/orgs","repos_url":"https://api.github.com/users/noahlz/repos","events_url":"https://api.github.com/users/noahlz/events{/privacy}","received_events_url":"https://api.github.com/users/noahlz/received_events","type":"User","site_admin":false},"body":"PR for #143 Log more errors for deserialization problems.\r\n\r\nIt turned out that the code to make this happen was already there in the form of `ToObjectGlitch` and the try/catch block of `feedArgsToConstructor` (as discussed in the issue). The problem was the existing try/catch wasn't catching errors thrown by Salat itself.\r\n\r\nMy strategy:\r\n1) Define a Salat-specific subclass of `Error`: `SalatGlitch`\r\n2) Have `feedArgsToConstructor` handle that error type\r\n3) Add a new error for the stacktrace in the issue: `EnumInflaterCompanionObjectGlitch`. The existing code was throwing `None.get` (ugh).\r\n\r\nI resisted the urge to completely overhaul Salat's error handling. Problems I see:\r\n\r\n1) Why did we extend `Error` for most Salat-specific errors.  `RuntimeException` is more idiomatic for JVM errors (was this an early Scala convention?)\r\n\r\n2) We throw `sys.error` all over the place, which generates fairly useless `RuntimeException`s (contradicting the aforementioned use of `java.lang.Error`, btw).\r\n\r\n3) Probably more things have to be declared to be `SalatGlitch` errors.\r\n\r\n4) It's not clear what the difference is between an \"error\" and a \"Glitch\" (does Glitch mean temporary error? In most cases, it appears to be due to programmer error) - but again, I'm just going with it, I don't want to start changing things around without reason.","created_at":"2016-08-22T03:55:27Z","updated_at":"2016-08-22T03:55:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/salat/salat/pulls/176/commits","review_comments_url":"https://api.github.com/repos/salat/salat/pulls/176/comments","review_comment_url":"https://api.github.com/repos/salat/salat/pulls/comments{/number}","comments_url":"https://api.github.com/repos/salat/salat/issues/176/comments","statuses_url":"https://api.github.com/repos/salat/salat/statuses/27fb42a2699c7db1dd4fa20b5495c7f9059cce4e","head":{"label":"noahlz:1.10.x/143-better-error","ref":"1.10.x/143-better-error","sha":"27fb42a2699c7db1dd4fa20b5495c7f9059cce4e","user":{"login":"noahlz","id":447754,"avatar_url":"https://avatars.githubusercontent.com/u/447754?v=3","gravatar_id":"","url":"https://api.github.com/users/noahlz","html_url":"https://github.com/noahlz","followers_url":"https://api.github.com/users/noahlz/followers","following_url":"https://api.github.com/users/noahlz/following{/other_user}","gists_url":"https://api.github.com/users/noahlz/gists{/gist_id}","starred_url":"https://api.github.com/users/noahlz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noahlz/subscriptions","organizations_url":"https://api.github.com/users/noahlz/orgs","repos_url":"https://api.github.com/users/noahlz/repos","events_url":"https://api.github.com/users/noahlz/events{/privacy}","received_events_url":"https://api.github.com/users/noahlz/received_events","type":"User","site_admin":false},"repo":{"id":24958776,"name":"salat","full_name":"noahlz/salat","owner":{"login":"noahlz","id":447754,"avatar_url":"https://avatars.githubusercontent.com/u/447754?v=3","gravatar_id":"","url":"https://api.github.com/users/noahlz","html_url":"https://github.com/noahlz","followers_url":"https://api.github.com/users/noahlz/followers","following_url":"https://api.github.com/users/noahlz/following{/other_user}","gists_url":"https://api.github.com/users/noahlz/gists{/gist_id}","starred_url":"https://api.github.com/users/noahlz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noahlz/subscriptions","organizations_url":"https://api.github.com/users/noahlz/orgs","repos_url":"https://api.github.com/users/noahlz/repos","events_url":"https://api.github.com/users/noahlz/events{/privacy}","received_events_url":"https://api.github.com/users/noahlz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/noahlz/salat","description":"Salat is a simple serialization library for case classes.","fork":true,"url":"https://api.github.com/repos/noahlz/salat","forks_url":"https://api.github.com/repos/noahlz/salat/forks","keys_url":"https://api.github.com/repos/noahlz/salat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/noahlz/salat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/noahlz/salat/teams","hooks_url":"https://api.github.com/repos/noahlz/salat/hooks","issue_events_url":"https://api.github.com/repos/noahlz/salat/issues/events{/number}","events_url":"https://api.github.com/repos/noahlz/salat/events","assignees_url":"https://api.github.com/repos/noahlz/salat/assignees{/user}","branches_url":"https://api.github.com/repos/noahlz/salat/branches{/branch}","tags_url":"https://api.github.com/repos/noahlz/salat/tags","blobs_url":"https://api.github.com/repos/noahlz/salat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/noahlz/salat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/noahlz/salat/git/refs{/sha}","trees_url":"https://api.github.com/repos/noahlz/salat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/noahlz/salat/statuses/{sha}","languages_url":"https://api.github.com/repos/noahlz/salat/languages","stargazers_url":"https://api.github.com/repos/noahlz/salat/stargazers","contributors_url":"https://api.github.com/repos/noahlz/salat/contributors","subscribers_url":"https://api.github.com/repos/noahlz/salat/subscribers","subscription_url":"https://api.github.com/repos/noahlz/salat/subscription","commits_url":"https://api.github.com/repos/noahlz/salat/commits{/sha}","git_commits_url":"https://api.github.com/repos/noahlz/salat/git/commits{/sha}","comments_url":"https://api.github.com/repos/noahlz/salat/comments{/number}","issue_comment_url":"https://api.github.com/repos/noahlz/salat/issues/comments{/number}","contents_url":"https://api.github.com/repos/noahlz/salat/contents/{+path}","compare_url":"https://api.github.com/repos/noahlz/salat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/noahlz/salat/merges","archive_url":"https://api.github.com/repos/noahlz/salat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/noahlz/salat/downloads","issues_url":"https://api.github.com/repos/noahlz/salat/issues{/number}","pulls_url":"https://api.github.com/repos/noahlz/salat/pulls{/number}","milestones_url":"https://api.github.com/repos/noahlz/salat/milestones{/number}","notifications_url":"https://api.github.com/repos/noahlz/salat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/noahlz/salat/labels{/name}","releases_url":"https://api.github.com/repos/noahlz/salat/releases{/id}","deployments_url":"https://api.github.com/repos/noahlz/salat/deployments","created_at":"2014-10-08T20:13:49Z","updated_at":"2016-05-31T14:13:10Z","pushed_at":"2016-08-22T03:46:33Z","git_url":"git://github.com/noahlz/salat.git","ssh_url":"git@github.com:noahlz/salat.git","clone_url":"https://github.com/noahlz/salat.git","svn_url":"https://github.com/noahlz/salat","homepage":"https://github.com/novus/salat","size":2763,"stargazers_count":0,"watchers_count":0,"language":"Scala","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":"salat:1.10.x-branch","ref":"1.10.x-branch","sha":"fc24335b3061251c32b244bc2455146ff802378c","user":{"login":"salat","id":12193802,"avatar_url":"https://avatars.githubusercontent.com/u/12193802?v=3","gravatar_id":"","url":"https://api.github.com/users/salat","html_url":"https://github.com/salat","followers_url":"https://api.github.com/users/salat/followers","following_url":"https://api.github.com/users/salat/following{/other_user}","gists_url":"https://api.github.com/users/salat/gists{/gist_id}","starred_url":"https://api.github.com/users/salat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salat/subscriptions","organizations_url":"https://api.github.com/users/salat/orgs","repos_url":"https://api.github.com/users/salat/repos","events_url":"https://api.github.com/users/salat/events{/privacy}","received_events_url":"https://api.github.com/users/salat/received_events","type":"Organization","site_admin":false},"repo":{"id":1246549,"name":"salat","full_name":"salat/salat","owner":{"login":"salat","id":12193802,"avatar_url":"https://avatars.githubusercontent.com/u/12193802?v=3","gravatar_id":"","url":"https://api.github.com/users/salat","html_url":"https://github.com/salat","followers_url":"https://api.github.com/users/salat/followers","following_url":"https://api.github.com/users/salat/following{/other_user}","gists_url":"https://api.github.com/users/salat/gists{/gist_id}","starred_url":"https://api.github.com/users/salat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salat/subscriptions","organizations_url":"https://api.github.com/users/salat/orgs","repos_url":"https://api.github.com/users/salat/repos","events_url":"https://api.github.com/users/salat/events{/privacy}","received_events_url":"https://api.github.com/users/salat/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/salat/salat","description":"Salat is a simple serialization library for case classes.","fork":false,"url":"https://api.github.com/repos/salat/salat","forks_url":"https://api.github.com/repos/salat/salat/forks","keys_url":"https://api.github.com/repos/salat/salat/keys{/key_id}","collaborators_url":"https://api.github.com/repos/salat/salat/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/salat/salat/teams","hooks_url":"https://api.github.com/repos/salat/salat/hooks","issue_events_url":"https://api.github.com/repos/salat/salat/issues/events{/number}","events_url":"https://api.github.com/repos/salat/salat/events","assignees_url":"https://api.github.com/repos/salat/salat/assignees{/user}","branches_url":"https://api.github.com/repos/salat/salat/branches{/branch}","tags_url":"https://api.github.com/repos/salat/salat/tags","blobs_url":"https://api.github.com/repos/salat/salat/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/salat/salat/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/salat/salat/git/refs{/sha}","trees_url":"https://api.github.com/repos/salat/salat/git/trees{/sha}","statuses_url":"https://api.github.com/repos/salat/salat/statuses/{sha}","languages_url":"https://api.github.com/repos/salat/salat/languages","stargazers_url":"https://api.github.com/repos/salat/salat/stargazers","contributors_url":"https://api.github.com/repos/salat/salat/contributors","subscribers_url":"https://api.github.com/repos/salat/salat/subscribers","subscription_url":"https://api.github.com/repos/salat/salat/subscription","commits_url":"https://api.github.com/repos/salat/salat/commits{/sha}","git_commits_url":"https://api.github.com/repos/salat/salat/git/commits{/sha}","comments_url":"https://api.github.com/repos/salat/salat/comments{/number}","issue_comment_url":"https://api.github.com/repos/salat/salat/issues/comments{/number}","contents_url":"https://api.github.com/repos/salat/salat/contents/{+path}","compare_url":"https://api.github.com/repos/salat/salat/compare/{base}...{head}","merges_url":"https://api.github.com/repos/salat/salat/merges","archive_url":"https://api.github.com/repos/salat/salat/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/salat/salat/downloads","issues_url":"https://api.github.com/repos/salat/salat/issues{/number}","pulls_url":"https://api.github.com/repos/salat/salat/pulls{/number}","milestones_url":"https://api.github.com/repos/salat/salat/milestones{/number}","notifications_url":"https://api.github.com/repos/salat/salat/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/salat/salat/labels{/name}","releases_url":"https://api.github.com/repos/salat/salat/releases{/id}","deployments_url":"https://api.github.com/repos/salat/salat/deployments","created_at":"2011-01-12T16:54:23Z","updated_at":"2016-08-16T12:56:37Z","pushed_at":"2016-08-22T01:23:20Z","git_url":"git://github.com/salat/salat.git","ssh_url":"git@github.com:salat/salat.git","clone_url":"https://github.com/salat/salat.git","svn_url":"https://github.com/salat/salat","homepage":"https://github.com/salat/salat","size":2963,"stargazers_count":479,"watchers_count":479,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":103,"mirror_url":null,"open_issues_count":48,"forks":103,"open_issues":48,"watchers":479,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/salat/salat/pulls/176"},"html":{"href":"https://github.com/salat/salat/pull/176"},"issue":{"href":"https://api.github.com/repos/salat/salat/issues/176"},"comments":{"href":"https://api.github.com/repos/salat/salat/issues/176/comments"},"review_comments":{"href":"https://api.github.com/repos/salat/salat/pulls/176/comments"},"review_comment":{"href":"https://api.github.com/repos/salat/salat/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/salat/salat/pulls/176/commits"},"statuses":{"href":"https://api.github.com/repos/salat/salat/statuses/27fb42a2699c7db1dd4fa20b5495c7f9059cce4e"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":31,"deletions":13,"changed_files":5}}
{"actor":{"display_login":"noahlz"}}