Open tmedwards opened 3 years ago
I am trying to trigger a line of JavaScript if my page errors no matter what the reason and per my googling, the way of doing that is to run this code:
window.onerror = function(message, source, lineno, colno, error) {
console.log("window.onerror", message);
};
But if an error happens before that, this won't run I was just about to do this as a postprocessing step: https://stackoverflow.com/a/58265036/61624
Is your feature request related to a problem? It would be nice to be able to hook into SugarCube's error handling process.
Describe the solution you'd like. A callback property attached to the
Config
object that's passed the relevant error instance/details upon error—or maybe a copy.