Update stack.js

throwinend event wasnt getting called.