User:Cshadd/monobook.js

function errorcustom { errorMsg = "A error has occured"; alert(errorMsg); } window.onerror = errorcustom;