Update task.js

add exception stack