I'm capturing js errors in the application with window.onerror, but the thing is - in Chrome if dev tools isn't opened - then the url parameter passed to onerror handler always equals to the opened url.
While if dev tools is opened - then the url points to the exact .js file the caused the js error.
How do you deal with it? Are there any workarounds?
And to be more clear - here are 2 results:
Uncaught ReferenceError: a is not defined index:122- this was received after fetching a pageUncaught ReferenceError: a is not defined List.js:122- this was received after fetching the same page with dev tools opened. This is an expected result - I've puta();call to theList.jsfile for testing.
UPD: this is done for functional testing (using selenium webdriver) - I want to capture js errors for further investigations.
