mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 23:16:30 +01:00
68d508a9e0
Show the stack trace for the `eventemitter.emit('error')` call in the case of an uncaught exception. Previously, there would be no clue in Node’s output about where the actual `throw` comes from. PR-URL: https://github.com/nodejs/node/pull/19003 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
8 lines
169 B
JavaScript
8 lines
169 B
JavaScript
'use strict';
|
|
require('../common');
|
|
const EventEmitter = require('events');
|
|
const er = new Error();
|
|
process.nextTick(() => {
|
|
new EventEmitter().emit('error', er);
|
|
});
|