Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Try Catch Error Handling In JavaScript

Basic try/catch with JavaScript

javascript
try {
  try_statements
}
catch (optional_exception_var) {
  catch_statements
}

And with [TODO: Code shorthand span ] that executes regardless of if an exception was thrown.

javascript
try {
  try_statements
}
catch (optional_exception_var) {
  catch_statements
}
finally {
  finally_statements
}

More details on MDN's try...catch page