You'll see "Script Error" all over the web if you look in the right plaes. –Amalgovinus Aug 24 '12 at 21:52 2 Uh, no. This behavior is intentional. Without the error object, there is no stack trace property. If you're logged in, the error might be 'Welcome Fred...' is undefined, whereas if you're not it might be 'Please Login ...' is undefined. check over here
for the love of god, anyone reading this, please make your error messages explain exactly what went wrong! The fix: CORS attributes and headers In order to get visibility into errors thrown from scripts originating from different origins, you must do two things. 1) Add a crossorigin=”anonymous” script attribute I called CORSET and you can see it here how it works. At the moment, we filter out the exceptions for iOS Safari and older Androids by checking if the error message is equal to “Script error.”.
Chrome 32.0.1700.76 (for desktop) returns all five parameters Chrome for Android (version 32) returns all five parameters Safari for iOS (6 and 7) returns the first three parameters (here is the Blog Archive ► 2015 (1) ► February (1) ► 2014 (8) ► November (1) ► October (1) ► September (1) ► August (1) ► June (2) ► March (1) ► January This means that no potentially user-identifying information like cookies or HTTP credentials will be transmitted by the browser to the server when requesting this file. 2) Add a Cross Origin HTTP
However by using arguments.callee.caller you can get a stacktrace. It’s painful because even though there’s an error occurring, you don’t know what the error is, nor from which code it’s originating. Probably more than you think TRY RAYGUN AND FIND OUT! Script Onerror It's most likely caused by something like this where the script itself is the file it can't load, hence the error occurring on line 0. share|improve this answer
As of 2014-01-18 the results were: Firefox 26.0 returns the first three parameters (hopefully this will be implemented soon) Internet Explorer 10 will return a column number but no error object. Script Error Line 0 Char 0 Code 0 Here’s an example of the Error object’s stack property in Chrome 46: "Error: foobar\n at new bar (
For example, if I include jQuery from google's cdn and use it to manipulate a non existent element on my page, I get an onerror that points to google's CDN. x is undefined url: document.location.href, stack: ex.stack // stacktrace string; remember, different per-browser! }; $ ...