language area · Control flow
Error handling
try, catch and finally, with the caught error typed as an Error whose message can be read.
- Implementation
- Implemented published in npm 0.1.0
- Kind
- Mynt language, not a SuiteScript method
A
mynt syntax
Supported · compiles today
1try {2 let customer = load Customer(123)3} catch err {4 log.error(err.message)5} finally {6 log.audit("Done")7}
1try {2 const customer = record.load({3 type: record.Type.CUSTOMER,4 id: 1235 });6} catch (err) {7 log.error({8 title: "execute",9 details: err.message10 });11} finally {12 log.audit({13 title: "execute",14 details: "Done"15 });16}
Lowers to JavaScript's own try statement. An Error is not text: interpolating one is an error, so read err.message.
B
release and compatibility
Published on npm since 0.1.0. Verified with mynt build on 13 Oct 2026.
- Reached the compiler.
- Published in Mynt 0.1.0.
C
related suitescript apis
No SuiteScript method of its own.
It compiles to plain JavaScript, so there is no Oracle API behind it.