summaryrefslogtreecommitdiff
path: root/tests/testdata/run/error_021_stack_method.ts
blob: b6ebe1f5ecb7e6e1bf60092cd49afe5739b7478e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class A {
  m(): never {
    throw new Error("method");
  }
}

try {
  new A().m();
} catch (error) {
  if (error instanceof Error) {
    console.log(error.stack);
  }
  throw error;
}