Skip to content

Instantly share code, notes, and snippets.

@guisouza
Last active August 29, 2015 14:28

Revisions

  1. guisouza revised this gist Aug 24, 2015. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions unbuggy.me
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    window.onerror = function(){
    var file = arguments[1]
    var line = arguments[2]
    var collumn = arguments[3]
    window.addEventListener('error', function(e) {
    var file = e.filename
    var line = e.lineno
    var collumn = e.colno

    var searchUrl = encodeURIComponent(arguments[0])
    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;');
    }
    })
  2. guisouza created this gist Aug 24, 2015.
    11 changes: 11 additions & 0 deletions unbuggy.me
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    window.onerror = function(){
    var file = arguments[1]
    var line = arguments[2]
    var collumn = arguments[3]

    var searchUrl = encodeURIComponent(arguments[0])
    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;');
    }