Skip to content

Instantly share code, notes, and snippets.

@guisouza
Last active August 29, 2015 14:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guisouza/83b415f898b9bd60f080 to your computer and use it in GitHub Desktop.
Save guisouza/83b415f898b9bd60f080 to your computer and use it in GitHub Desktop.
window.addEventListener('error', function(e) {
var file = e.filename
var line = e.lineno
var collumn = e.colno
var searchUrl = encodeURIComponent(e.error.message)
console.log('Ocorreu um erro no arquivo',file,'na linha',line,':',collumn)
console.log('Para buscar o erro, acesso o link :','http://stackoverflow.com/search?q='+searchUrl )
console.log('Powered By :')
console.log('%c', 'padding:28px 119px;line-height:100px;background:url(http://cdn.sstatic.net/stackoverflow/img/sprites.png?v=6) no-repeat;');
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment