Node.js - Error Handling Patterns
What will be the output of this code snippet?
class NotFoundError extends Error {
constructor(message) {
super(message);
this.name = 'NotFoundError';
}
}
try {
throw new NotFoundError('Item not found');
} catch (e) {
console.log(e.name + ': ' + e.message);
}