mirror of
https://github.com/nodejs/node.git
synced 2025-05-01 17:03:34 +00:00

PR-URL: https://github.com/nodejs/node/pull/44197 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Michaël Zasso <targos@protonmail.com>
23 lines
303 B
JavaScript
23 lines
303 B
JavaScript
'use strict';
|
|
require('../common');
|
|
Error.stackTraceLimit = 2;
|
|
|
|
const EventEmitter = require('events');
|
|
|
|
function foo() {
|
|
function bar() {
|
|
return new Error('foo:bar');
|
|
}
|
|
|
|
return bar();
|
|
}
|
|
|
|
const ee = new EventEmitter();
|
|
const err = foo();
|
|
|
|
function quux() {
|
|
ee.emit('error', err);
|
|
}
|
|
|
|
quux();
|