xref: /third_party/node/test/fixtures/uncaught-exceptions/callbackify1.js
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /third_party/node/test/fixtures/uncaught-exceptions/
11cb0ef41Sopenharmony_ci'use strict';
21cb0ef41Sopenharmony_ci
31cb0ef41Sopenharmony_ci// Used to test that `uncaughtException` is emitted
41cb0ef41Sopenharmony_ci
51cb0ef41Sopenharmony_ciconst { callbackify } = require('util');
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_ci{
81cb0ef41Sopenharmony_ci  async function fn() { }
91cb0ef41Sopenharmony_ci
101cb0ef41Sopenharmony_ci  const cbFn = callbackify(fn);
111cb0ef41Sopenharmony_ci
121cb0ef41Sopenharmony_ci  cbFn((err, ret) => {
131cb0ef41Sopenharmony_ci    throw new Error(__filename);
141cb0ef41Sopenharmony_ci  });
151cb0ef41Sopenharmony_ci}
16

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