Files
ValueScript/inputs/passing/exceptions/catchNonLocal.ts
2023-03-23 17:17:27 +11:00

18 lines
234 B
TypeScript

// test_output!: "Caught: boom"
export default function () {
try {
callBoom();
} catch (error) {
return `Caught: ${error.message}`;
}
}
function callBoom() {
boom();
}
function boom() {
throw new Error("boom");
}