It could work by having the task behave exactly as if it finished running, except in an exception state. Then whoever cares about the result of the task needs to clean up.