Files
ValueScript/inputs/passing/exceptions/catchNonLocal.ts
2023-05-31 12:18:32 +10: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");
}