Handling Errors with try-catch-finally
What issue does this code demonstrate?
try {
throw { name: 'CustomError', message: 'Something went wrong' };
} catch (error) {
console.error(error instanceof Error); // false
}
try {
throw { name: 'CustomError', message: 'Something went wrong' };
} catch (error) {
console.error(error instanceof Error); // false
}