Javascript essayez ... capture dans settimeout

try {
    setTimeout(function() {
        // error in the code
    }, 3000);
} catch (e) {
  console.log( "won't work" );
}
SAMER SAEID