โคด๏ธtry-catch-finally
๐ง under construction
try { ... } // run code that may throw.
catch (err) { ... } // error handling (andโจ rethrow)
finally { ... } // cleanup codetry {
noSuchFunc(); // โ ReferenceError (not catched)
} catch(err) {
// `console.log(err)` omitted ... (dangerous)โ
// or, `throw err` omitted ...
}
// the code will continue executing happilyโLast updated