DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Customize Error Dialog

01.14.2006
| 4259 views |
  • submit to reddit
        
window.onerror = function(mes,file,num){
    alert([
        "file    : " + file,
        "line    : " + num,
        "message : " + mes
    ].join("\n"));
    return true;
}
with XMLHttpRequest 
<a href="http://la.ma.la/misc/js/debugscreen/">http://la.ma.la/misc/js/debugscreen/</a>