tryCatch function
Block
tryCatch(
- Code tryBlock,
- Code catchBlock
Implementation
Block tryCatch(
Code tryBlock,
Code catchBlock,
) {
return Block.of([
const Code('try {'),
tryBlock,
const Code('} catch (e) {'),
catchBlock,
const Code('}'),
]);
}