summaryrefslogtreecommitdiff
path: root/test/parallel/test-async-hooks-run-in-async-scope-caught-exception.js
blob: e38cefd20e4fece619ee2b09961866abacc0130a (plain)
1
2
3
4
5
6
7
8
9
10
11
'use strict';

require('../common');
const { AsyncResource } = require('async_hooks');

try {
  new AsyncResource('foo').runInAsyncScope(() => { throw new Error('bar'); });
} catch {
  // Continue regardless of error.
}
// Should abort (fail the case) if async id is not matching.