mirror of
https://github.com/viewflow/viewflow.git
synced 2026-03-13 10:32:34 +08:00
12 lines
273 B
JavaScript
12 lines
273 B
JavaScript
window.errors = [];
|
|
|
|
window.prevOnError = window.onerror;
|
|
|
|
window.onerror = function(msg, url, line, col, error) {
|
|
errors.push({msg: msg, url: url, line: line});
|
|
if (window.prevOnError) {
|
|
return window.prevOnError(errorMsg, url, lineNumber);
|
|
}
|
|
return false;
|
|
};
|