js try/catch code example
Example 1: blank catch js
try {
try_statements
}
[catch [(exception_var)] {
catch_statements
}]
[finally {
finally_statements
}]
Example 2: how to raise exception in js
throw new Error('Exception message');
try {
try_statements
}
[catch [(exception_var)] {
catch_statements
}]
[finally {
finally_statements
}]
throw new Error('Exception message');