The way stopImmediatePropagation is being handled in FlexJS is like this: try { return org.apache.flex.events.EventDispatcher.base(this, 'dispatchEvent', event); } catch (e) { if (e.name != "stopImmediatePropagation") throw e; }
This is proving to be very painful because almost any bug in client code will be swallowed by this try/catch and there’s no stack trace to find where the error is. (Code execution is almost always wrapped in an event handler of some manner, shape or form.) Is there another way to handle this that will preserve the stack trace on errors?