xref: /third_party/node/test/fixtures/uncaught-exceptions/domain.js (revision 1cb0ef41)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/fixtures/uncaught-exceptions/
11cb0ef41Sopenharmony_ciconst domain = require('domain');
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_civar d = domain.create();
41cb0ef41Sopenharmony_cid.on('error', function(err) {
51cb0ef41Sopenharmony_ci  console.log('[ignored]', err);
61cb0ef41Sopenharmony_ci});
71cb0ef41Sopenharmony_ci
81cb0ef41Sopenharmony_cid.run(function() {
91cb0ef41Sopenharmony_ci  setImmediate(function() {
101cb0ef41Sopenharmony_ci    throw new Error('in domain');
111cb0ef41Sopenharmony_ci  });
121cb0ef41Sopenharmony_ci});
13

Indexes created Thu Nov 07 10:32:03 CST 2024