Node EventEmitter Emit Erro

// If an EventEmitter does not have at least one listener 
// registered for the 'error' event, and an 'error' event 
// is emitted, the error is thrown, a stack trace is printed, 
// and the Node.js process exits.

const myEmitter = new MyEmitter();
myEmitter.emit('error', new Error('whoops!'));
// Throws and crashes Node.js
florinrelea