• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2// Flags: --no-force-node-api-uncaught-exceptions-policy
3
4const common = require('../../common');
5const binding = require(`./build/${common.buildType}/test_uncaught_exception_v9`);
6
7process.on(
8  'uncaughtException',
9  common.mustNotCall('uncaught callback errors should be suppressed ' +
10    'with the option --no-force-node-api-uncaught-exceptions-policy'),
11);
12
13binding.CallIntoModule(
14  common.mustCall(() => {
15    throw new Error('callback error');
16  }),
17  {},
18  'resource_name',
19  common.mustCall(function finalizer() {
20    throw new Error('finalizer error');
21  }),
22);
23