Skip to content
Prev Previous commit
Next Next commit
fixup! crlf => lf
  • Loading branch information
Flarna committed Jan 8, 2020
commit df03daaff4a346958fb884378080ba345c514fa0
70 changes: 35 additions & 35 deletions test/parallel/test-process-uncaught-exception-monitor.js
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
'use strict';
const common = require('../common');
const assert = require('assert');
const theErr = new Error('MyError');
process.on(
process.uncaughtExceptionMonitor,
common.mustCall(function onUncaughtExceptionMonitor(err, origin) {
assert.strictEqual(err, theErr);
assert.strictEqual(origin, 'uncaughtException');
}, 2)
);
process.on('uncaughtException', common.mustCall(
function onUncaughtException(err, origin) {
assert.strictEqual(origin, 'uncaughtException');
assert.strictEqual(err, theErr);
})
);
process.nextTick(common.mustCall(
function withExceptionCaptureCallback() {
process.setUncaughtExceptionCaptureCallback(common.mustCall(
function uncaughtExceptionCaptureCallback(err) {
assert.strictEqual(err, theErr);
})
);
throw theErr;
})
);
throw theErr;
'use strict';

const common = require('../common');
const assert = require('assert');

const theErr = new Error('MyError');

process.on(
process.uncaughtExceptionMonitor,
common.mustCall(function onUncaughtExceptionMonitor(err, origin) {
assert.strictEqual(err, theErr);
assert.strictEqual(origin, 'uncaughtException');
}, 2)
);

process.on('uncaughtException', common.mustCall(
function onUncaughtException(err, origin) {
assert.strictEqual(origin, 'uncaughtException');
assert.strictEqual(err, theErr);
})
);

process.nextTick(common.mustCall(
function withExceptionCaptureCallback() {
process.setUncaughtExceptionCaptureCallback(common.mustCall(
function uncaughtExceptionCaptureCallback(err) {
assert.strictEqual(err, theErr);
})
);

throw theErr;
})
);

throw theErr;