{"action":"created","issue":{"url":"https://api.github.com/repos/reactphp/dns/issues/26","repository_url":"https://api.github.com/repos/reactphp/dns","labels_url":"https://api.github.com/repos/reactphp/dns/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/reactphp/dns/issues/26/comments","events_url":"https://api.github.com/repos/reactphp/dns/issues/26/events","html_url":"https://github.com/reactphp/dns/pull/26","id":81381993,"number":26,"title":"Avoid hidding exceptions","user":{"login":"arnaud-lb","id":365207,"avatar_url":"https://avatars.githubusercontent.com/u/365207?v=3","gravatar_id":"","url":"https://api.github.com/users/arnaud-lb","html_url":"https://github.com/arnaud-lb","followers_url":"https://api.github.com/users/arnaud-lb/followers","following_url":"https://api.github.com/users/arnaud-lb/following{/other_user}","gists_url":"https://api.github.com/users/arnaud-lb/gists{/gist_id}","starred_url":"https://api.github.com/users/arnaud-lb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnaud-lb/subscriptions","organizations_url":"https://api.github.com/users/arnaud-lb/orgs","repos_url":"https://api.github.com/users/arnaud-lb/repos","events_url":"https://api.github.com/users/arnaud-lb/events{/privacy}","received_events_url":"https://api.github.com/users/arnaud-lb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2015-05-27T10:07:37Z","updated_at":"2016-10-04T15:28:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/reactphp/dns/pulls/26","html_url":"https://github.com/reactphp/dns/pull/26","diff_url":"https://github.com/reactphp/dns/pull/26.diff","patch_url":"https://github.com/reactphp/dns/pull/26.patch"},"body":"`then()` catches exceptions, which is not desirable when its result is not returned.\r\n\r\nWhen using the RetryExecutor, the exception thrown by the following code is caught, whereas it should not:\r\n\r\n``` php\r\n$executor = new Executor($loop, new Parser(), new BinaryDumper());\r\n$executor = new RetryExecutor($executor);\r\n$resolver = new Resolver('8.8.8.8:53', $executor);\r\n$executor->resolve(null)\r\n    // Once the promise is rejected, `done()` throws an exceptions, since there is no `onRejected` callback.\r\n    // However, the exception is caught by RetryExecutor's `then()`.\r\n    // This PR fixes this.\r\n    ->done(function ($result) {\r\n        ...\r\n    });\r\n```\r\n\r\nThe PR fixes this by changing some `then` to `done`."},"comment":{"url":"https://api.github.com/repos/reactphp/dns/issues/comments/251422695","html_url":"https://github.com/reactphp/dns/pull/26#issuecomment-251422695","issue_url":"https://api.github.com/repos/reactphp/dns/issues/26","id":251422695,"user":{"login":"arnaud-lb","id":365207,"avatar_url":"https://avatars.githubusercontent.com/u/365207?v=3","gravatar_id":"","url":"https://api.github.com/users/arnaud-lb","html_url":"https://github.com/arnaud-lb","followers_url":"https://api.github.com/users/arnaud-lb/followers","following_url":"https://api.github.com/users/arnaud-lb/following{/other_user}","gists_url":"https://api.github.com/users/arnaud-lb/gists{/gist_id}","starred_url":"https://api.github.com/users/arnaud-lb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnaud-lb/subscriptions","organizations_url":"https://api.github.com/users/arnaud-lb/orgs","repos_url":"https://api.github.com/users/arnaud-lb/repos","events_url":"https://api.github.com/users/arnaud-lb/events{/privacy}","received_events_url":"https://api.github.com/users/arnaud-lb/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T15:28:12Z","updated_at":"2016-10-04T15:28:12Z","body":"@clue: I've rebased the PR against master, to fix the conflicts.\r\n\r\nAlso, I've updated the composer requirements (react/promise ~2.2), and removed PHP 5.3 from travis' php targets."}}
{"actor":{"display_login":"arnaud-lb"}}