Thursday, March 14, 2013

Debugging JavaScript - Catch Everything




try {
    // ...
} catch(err) {
    console.log(
        'Error at line ' +
        error.line +
        " in " +
        error.sourceURL +
        ' : ' +
        error.message
    ); 
}

Sponsor Ads


3 comments: