Is it possible to use multiple catch in JS(ES5 or ES6) like I describe below (it is only example):
S(ES5 or ES6)
try { // just an error throw 1; } ca
Try in a that way:
try { throw 1; } catch(e) { if (e instanceof ReferenceError) { // ReferenceError action here } else if (typeof e === "string") { // error as a string action here } else { // General error here } } finally {}