Raise TaskWorkerException. Fixes #4494
Merge pull request #4525 from juztas/patch-3

Raise TaskWorkerException. Fixes #4494