https://www.devmedia.com.br/javascript-try-catch/41019
Veja esse conteúdo na @DevMedia: JavaScript: try...catch