Chrome: Will an error in code invoked from the dev console trigger window.onerror?

They don’t (in Chrome where I tested), easy way to test is

window.onerror = function () {console.log('error!');};
throw new Error();
// Error

You can make them do it if you defer them, though

window.setTimeout(function() {throw new Error()}, 0);
// error!
// Uncaught Error

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)