Made a small change to registerTask, to have errors returned by task bub...

...ble up to whatever runs the task.