# Where is error message on the remote worker?

**URL:** <https://discourse.julialang.org/t/where-is-error-message-on-the-remote-worker/28898>\
**Category:** General Usage\
**Tags:** question, parallel\
**Created:** [September 18, 2019, 3:42pm UTC](https://discourse.julialang.org/t/where-is-error-message-on-the-remote-worker/28898 "2019-09-18T15:42:22Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Chong\_Wang](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chong_wang/32/20307_2.png) [@Chong\_Wang](https://discourse.julialang.org/u/Chong_Wang)\
**Post date:** [September 20, 2019, 5:34pm UTC](https://discourse.julialang.org/t/where-is-error-message-on-the-remote-worker/28898/6 "2019-09-20T17:34:50Z")

</div>

I tried the following implementation

```julia
function do_work(f, jobs, results, args...)
    while true
        x = take!(jobs)
        result = try
            f(x, args...)
        catch e
            ErrorException(sprint(showerror, e))
        end
        put!(results, (x, result))
    end
end

```

But this `do_work` will not catch any exception is `f` is simply not defined on the remote process. What I was asking is simply how to catch the undefined `f` error.

---

_[View the full topic](https://discourse.julialang.org/t/where-is-error-message-on-the-remote-worker/28898)._
