Is it possible to use multiple catch in JS(ES5 or ES6) like I describe below (it is only example):
try {
// just an error
throw 1;
}
catch(e if e instanceof ReferenceError) {
// here i would like to manage errors which is 'undefined' type
}
catch(e if typeof e === "string") {
// here i can manage all string exeptions
}
// and so on and so on
catch(e) {
// and finally here i can manage another exeptions
}
finally {
// and a simple finally block
}
This is the same as we have in C# or in a Java.