mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
8055bdbbc9
On process exit if some assertion error occurs value of `process._exiting` was hidden, this fix will show the actual error message with value. PR-URL: https://github.com/nodejs/node/pull/20956 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
15 lines
274 B
JavaScript
15 lines
274 B
JavaScript
'use strict';
|
|
|
|
const common = require('../common');
|
|
const assert = require('assert');
|
|
|
|
process.on('exit', () => {
|
|
assert.strictEqual(process._exiting, true);
|
|
|
|
process.nextTick(
|
|
common.mustNotCall('process is exiting, should not be called')
|
|
);
|
|
});
|
|
|
|
process.exit();
|