Add better exception-handling to worker protocol