chrome catch window error code example
Example: how to trap js errors window.onerror
window.onerror = function (msg, url, lineNo, columnNo, error) {
// ... handle error ...
return false;
}
window.onerror = function (msg, url, lineNo, columnNo, error) {
// ... handle error ...
return false;
}