REFACTOR pass error object

The chain window.onerror is performing is neglecting fourth parameter
used on modern browser, which is the error object and contains, most
notably, the stack trace.

Added it back.