Stopping pmap when one of the node hit an error

I’m using pmap on my cluster university to distribute computation between different nodes. I’d like to be able to stop all the workers when one of them fails/throw an error. I’ve been looking for a while and I couldn’t find any solution.

For example if I start Julia with 4 processes like this
julia -p 4
and run the following code

pmap(1:nworkers()) do j
    if myid() == 3
        throw(ErrorException("End"))
    end
    sleep(5)
    println(myid())
end

I would like to see the error and no print at all, so that every workers stop when one of them throw an exception.