deno/cli/tests/error_019_stack_function.ts

11 lines
136 B
TypeScript

function foo(): never {
throw new Error("function");
}
try {
foo();
} catch (error) {
console.log(error.stack);
throw error;
}