{"action":"created","issue":{"url":"https://api.github.com/repos/Q42/RxPromise/issues/7","labels_url":"https://api.github.com/repos/Q42/RxPromise/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/Q42/RxPromise/issues/7/comments","events_url":"https://api.github.com/repos/Q42/RxPromise/issues/7/events","html_url":"https://github.com/Q42/RxPromise/issues/7","id":102633479,"number":7,"title":"Usage, how to catch errors","user":{"login":"mariusk","id":218612,"avatar_url":"https://avatars.githubusercontent.com/u/218612?v=3","gravatar_id":"","url":"https://api.github.com/users/mariusk","html_url":"https://github.com/mariusk","followers_url":"https://api.github.com/users/mariusk/followers","following_url":"https://api.github.com/users/mariusk/following{/other_user}","gists_url":"https://api.github.com/users/mariusk/gists{/gist_id}","starred_url":"https://api.github.com/users/mariusk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariusk/subscriptions","organizations_url":"https://api.github.com/users/mariusk/orgs","repos_url":"https://api.github.com/users/mariusk/repos","events_url":"https://api.github.com/users/mariusk/events{/privacy}","received_events_url":"https://api.github.com/users/mariusk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-23T15:53:41Z","updated_at":"2015-08-24T06:34:02Z","closed_at":"2015-08-24T06:34:02Z","body":"I'm having some trouble figuring out how this library is supposed to be used. Can anybody with a clue provide a canonical example of Promise.async should be used, with a proper success and failure handler, including how the error would be signaled (calling `error` or `throwing`?)? I've tried calling `then` with two callback functions, and calling `onError` on the return value of `Promise.async`, but without much success in handling errors. TIA."},"comment":{"url":"https://api.github.com/repos/Q42/RxPromise/issues/comments/134060397","html_url":"https://github.com/Q42/RxPromise/issues/7#issuecomment-134060397","issue_url":"https://api.github.com/repos/Q42/RxPromise/issues/7","id":134060397,"user":{"login":"mariusk","id":218612,"avatar_url":"https://avatars.githubusercontent.com/u/218612?v=3","gravatar_id":"","url":"https://api.github.com/users/mariusk","html_url":"https://github.com/mariusk","followers_url":"https://api.github.com/users/mariusk/followers","following_url":"https://api.github.com/users/mariusk/following{/other_user}","gists_url":"https://api.github.com/users/mariusk/gists{/gist_id}","starred_url":"https://api.github.com/users/mariusk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariusk/subscriptions","organizations_url":"https://api.github.com/users/mariusk/orgs","repos_url":"https://api.github.com/users/mariusk/repos","events_url":"https://api.github.com/users/mariusk/events{/privacy}","received_events_url":"https://api.github.com/users/mariusk/received_events","type":"User","site_admin":false},"created_at":"2015-08-24T06:34:02Z","updated_at":"2015-08-24T06:34:02Z","body":"There's definitively something going on at my end, because I when I tried the two callable form of `then`, the error handler did not get called when an exception got called. For the heck of it, I also tried adding an `.onError` handler (but after `.then` which possibly doesn't even make any sense), but no success there either. It could be something related to me trying to do this using Kotlin (not Java) as well. But based on your comment it seems I've understood how it's supposed to work, even though I haven't been able to get it working. In the meantime I've worked around it using another Promise library (Kotlin native, Kovenant) and I'm seeing no trouble there. I'll see if I can give this one another try."}}