replace Task.error() with Task.post_execute(), simplify exception