Files
ValueScript/concept-code/exceptions/nestedTry.ts
2023-03-22 16:37:11 +11:00

20 lines
300 B
TypeScript

export default function () {
let logs: unknown[] = [];
try {
logs.push("here");
try {
throw new Error("nested boom");
} catch (error) {
logs.push(error.message);
}
throw new Error("boom");
} catch (error) {
logs.push(error.message);
}
return logs;
}