If I define custom error classes like this:
class MyCustom Error extends Error{ }
How can I catch multiple errors like this:
try{
if(something)
throw MyCustomError();
if(something_else)
throw Error('lalala');
}catch(MyCustomError err){
}catch(err){
}
?
The code above does not work and gives some syntax error