I am trying to figure out if there is a piece of Javascript that can be used to get the current javascript error in the window if there is one.
Internally, we have several websites that users from all over use. Some of them use the same hardware and systems as us where as others user VM's where the environments are different.
In short, we get a lot of support issues where a tool isn't working and we have to explain how to check for a JS error in IE.
I'm wanting to make a Bookmarklet they can have in their toolbar and when they experience an issue, it checks to see if there is a window error and then I can do something with it.
I know there is window.onerror=function(msg, url, linenumber){} but thats when an error happens. I am looking for a way to check for an error at any time when the user clicks on the bookmarklet.