{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/12908","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/12908/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/12908/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/12908/events","html_url":"https://github.com/JuliaLang/julia/issues/12908","id":104365910,"number":12908,"title":"RemoteException not re-thrown by pmap()","user":{"login":"samoconnor","id":8266283,"avatar_url":"https://avatars.githubusercontent.com/u/8266283?v=3","gravatar_id":"","url":"https://api.github.com/users/samoconnor","html_url":"https://github.com/samoconnor","followers_url":"https://api.github.com/users/samoconnor/followers","following_url":"https://api.github.com/users/samoconnor/following{/other_user}","gists_url":"https://api.github.com/users/samoconnor/gists{/gist_id}","starred_url":"https://api.github.com/users/samoconnor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samoconnor/subscriptions","organizations_url":"https://api.github.com/users/samoconnor/orgs","repos_url":"https://api.github.com/users/samoconnor/repos","events_url":"https://api.github.com/users/samoconnor/events{/privacy}","received_events_url":"https://api.github.com/users/samoconnor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-01T22:18:02Z","updated_at":"2015-09-01T23:03:02Z","closed_at":null,"body":"```julia\r\n@everywhere function do_work(i)\r\n    r = [1,2,3][i]\r\n    println(r)\r\n    return r\r\nend\r\n\r\nfor r in pmap(do_work, [3,2,1,0])\r\n    println(\"pmap got result\")\r\n    println(typeof(r))\r\nend\r\n```\r\n\r\nThe `pmap()` call above returns a RemoteException object in the result array instead of re-throwing it.\r\n\r\nThe output is:\r\n\r\n```\r\n./julia -p4 test.jl\r\n\tFrom worker 3:\t2\r\n\tFrom worker 4:\t1\r\n\tFrom worker 2:\t3\r\npmap got result\r\nInt64\r\npmap got result\r\nInt64\r\npmap got result\r\nInt64\r\npmap got result\r\nRemoteException\r\n```\r\n\r\nChanging `pmap()` to `map()` results in BoundsError as expected.\r\n"},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/136887575","html_url":"https://github.com/JuliaLang/julia/issues/12908#issuecomment-136887575","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/12908","id":136887575,"user":{"login":"simonster","id":470884,"avatar_url":"https://avatars.githubusercontent.com/u/470884?v=3","gravatar_id":"","url":"https://api.github.com/users/simonster","html_url":"https://github.com/simonster","followers_url":"https://api.github.com/users/simonster/followers","following_url":"https://api.github.com/users/simonster/following{/other_user}","gists_url":"https://api.github.com/users/simonster/gists{/gist_id}","starred_url":"https://api.github.com/users/simonster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonster/subscriptions","organizations_url":"https://api.github.com/users/simonster/orgs","repos_url":"https://api.github.com/users/simonster/repos","events_url":"https://api.github.com/users/simonster/events{/privacy}","received_events_url":"https://api.github.com/users/simonster/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T23:03:02Z","updated_at":"2015-09-01T23:03:02Z","body":"Related to/dup of #7808. Also IMO `err_stop=true` and rethrowing the error should be the default behavior for `pmap`."}}