Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> JavaScript >> Snippet

Custom error handler function


assign your custom error handler function to the windows onerror property :

window.onerror = myErrorHandler;

function myErrorHandler ( msg, url, line) {  
  //your code goes here
  return true ;
  }