{"action":"closed","issue":{"url":"https://api.github.com/repos/pelias/model/issues/2","labels_url":"https://api.github.com/repos/pelias/model/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/pelias/model/issues/2/comments","events_url":"https://api.github.com/repos/pelias/model/issues/2/events","html_url":"https://github.com/pelias/model/issues/2","id":55329446,"number":2,"title":"return values indicating success/failure instead of throwing exceptions","user":{"login":"sevko","id":4467604,"avatar_url":"https://avatars.githubusercontent.com/u/4467604?v=3","gravatar_id":"","url":"https://api.github.com/users/sevko","html_url":"https://github.com/sevko","followers_url":"https://api.github.com/users/sevko/followers","following_url":"https://api.github.com/users/sevko/following{/other_user}","gists_url":"https://api.github.com/users/sevko/gists{/gist_id}","starred_url":"https://api.github.com/users/sevko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sevko/subscriptions","organizations_url":"https://api.github.com/users/sevko/orgs","repos_url":"https://api.github.com/users/sevko/repos","events_url":"https://api.github.com/users/sevko/events{/privacy}","received_events_url":"https://api.github.com/users/sevko/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pelias/model/labels/refactor","name":"refactor","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"missinglink","id":738069,"avatar_url":"https://avatars.githubusercontent.com/u/738069?v=3","gravatar_id":"","url":"https://api.github.com/users/missinglink","html_url":"https://github.com/missinglink","followers_url":"https://api.github.com/users/missinglink/followers","following_url":"https://api.github.com/users/missinglink/following{/other_user}","gists_url":"https://api.github.com/users/missinglink/gists{/gist_id}","starred_url":"https://api.github.com/users/missinglink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/missinglink/subscriptions","organizations_url":"https://api.github.com/users/missinglink/orgs","repos_url":"https://api.github.com/users/missinglink/repos","events_url":"https://api.github.com/users/missinglink/events{/privacy}","received_events_url":"https://api.github.com/users/missinglink/received_events","type":"User","site_admin":false},"milestone":null,"comments":13,"created_at":"2015-01-23T20:35:40Z","updated_at":"2015-02-12T20:33:57Z","closed_at":"2015-02-12T20:33:57Z","body":"Setter methods should probably return values like `true`/`false` to indicate success/failure instead of `throw`ing runaway exceptions that lead to messes like this:\r\n\r\n```\r\n                                                                        \r\ntry {\r\n\trecord.setAdmin( 'admin0', admin1 );\r\n} catch(){};\r\n                                                                            \r\ntry {\r\n\trecord.setAdmin( 'admin1', admin2 );\r\n} catch(){};\r\n                                                                            \r\ntry {\r\n\trecord.setAdmin( 'admin2', admin3 );\r\n} catch(){};\r\n```\r\n\r\nNote that the individual `try ... catch` blocks are necessary because we don't want to skip over attempting to add admin values 2 and 3 if 1 turned out to be invalid."}}