{"action":"created","issue":{"url":"https://api.github.com/repos/atom/season/issues/8","labels_url":"https://api.github.com/repos/atom/season/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/atom/season/issues/8/comments","events_url":"https://api.github.com/repos/atom/season/issues/8/events","html_url":"https://github.com/atom/season/issues/8","id":64800086,"number":8,"title":"catching callback errors","user":{"login":"charlierudolph","id":1676758,"avatar_url":"https://avatars.githubusercontent.com/u/1676758?v=3","gravatar_id":"","url":"https://api.github.com/users/charlierudolph","html_url":"https://github.com/charlierudolph","followers_url":"https://api.github.com/users/charlierudolph/followers","following_url":"https://api.github.com/users/charlierudolph/following{/other_user}","gists_url":"https://api.github.com/users/charlierudolph/gists{/gist_id}","starred_url":"https://api.github.com/users/charlierudolph/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charlierudolph/subscriptions","organizations_url":"https://api.github.com/users/charlierudolph/orgs","repos_url":"https://api.github.com/users/charlierudolph/repos","events_url":"https://api.github.com/users/charlierudolph/events{/privacy}","received_events_url":"https://api.github.com/users/charlierudolph/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/atom/season/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"kevinsawicki","id":671378,"avatar_url":"https://avatars.githubusercontent.com/u/671378?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinsawicki","html_url":"https://github.com/kevinsawicki","followers_url":"https://api.github.com/users/kevinsawicki/followers","following_url":"https://api.github.com/users/kevinsawicki/following{/other_user}","gists_url":"https://api.github.com/users/kevinsawicki/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinsawicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinsawicki/subscriptions","organizations_url":"https://api.github.com/users/kevinsawicki/orgs","repos_url":"https://api.github.com/users/kevinsawicki/repos","events_url":"https://api.github.com/users/kevinsawicki/events{/privacy}","received_events_url":"https://api.github.com/users/kevinsawicki/received_events","type":"User","site_admin":true},"milestone":null,"comments":3,"created_at":"2015-03-27T16:36:29Z","updated_at":"2015-03-27T18:47:33Z","closed_at":"2015-03-27T18:47:19Z","body":"season is catching an error thrown by one of my callbacks which made debugging a pain.\r\nThe offending function is:\r\n```coffee\r\nparseContents = (objectPath, cachePath, contents, callback) ->\r\n  try\r\n    object = parseObject(objectPath, contents)\r\n    writeCacheFile(cachePath, object) if cachePath\r\n    callback?(null, object)\r\n  catch parseError\r\n    callback?(parseError)\r\n```\r\ntry/catches should be extremely limited in their scope to they only catch errors they want to.\r\nThus I believe this function needs to be updated to:\r\n```coffee\r\nparseContents = (objectPath, cachePath, contents, callback) ->\r\n  try\r\n    object = parseObject(objectPath, contents)\r\n  catch parseError\r\n    return callback?(parseError)\r\n\r\n  writeCacheFile(cachePath, object) if cachePath\r\n  callback?(null, object)\r\n```\r\nI'm happy to create a PR with this change and test verifying this behavior if you agree"},"comment":{"url":"https://api.github.com/repos/atom/season/issues/comments/87050110","html_url":"https://github.com/atom/season/issues/8#issuecomment-87050110","issue_url":"https://api.github.com/repos/atom/season/issues/8","id":87050110,"user":{"login":"kevinsawicki","id":671378,"avatar_url":"https://avatars.githubusercontent.com/u/671378?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinsawicki","html_url":"https://github.com/kevinsawicki","followers_url":"https://api.github.com/users/kevinsawicki/followers","following_url":"https://api.github.com/users/kevinsawicki/following{/other_user}","gists_url":"https://api.github.com/users/kevinsawicki/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinsawicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinsawicki/subscriptions","organizations_url":"https://api.github.com/users/kevinsawicki/orgs","repos_url":"https://api.github.com/users/kevinsawicki/repos","events_url":"https://api.github.com/users/kevinsawicki/events{/privacy}","received_events_url":"https://api.github.com/users/kevinsawicki/received_events","type":"User","site_admin":true},"created_at":"2015-03-27T18:47:33Z","updated_at":"2015-03-27T18:47:33Z","body":"Thanks for reporting this, fixed and published in 5.1.5"}}