Refer to the " try...catch" manual in MDN .
, try/catch ( "" throw). try/catch:
try {
// Code
} catch (varName) { // Optional
// If exception thrown in try block,
// execute this block
} finally { // Optional
// Execute this block after
// try or after catch clause
// (i.e. this is *always* called)
}
varName catch. , ( , , String, Error object).