Skip to content

Instantly share code, notes, and snippets.

@bprosnitz
Created March 10, 2015 21:42
Show Gist options
  • Save bprosnitz/16df00bcea5cbb7f92a8 to your computer and use it in GitHub Desktop.
Save bprosnitz/16df00bcea5cbb7f92a8 to your computer and use it in GitHub Desktop.
Error debug hack - log when errors are created to find ones not logged or thrown
var OrigError = Error;
window.Error = function(arg1,arg2,arg3,arg4,arg5,arg6) {
console.log('caught error: ', arg1, arg2,arg3,arg4,arg5,arg6);
console.log(new OrigError().stack)
return new OrigError(arg1,arg2,arg3,arg4,arg5,arg6);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment