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

Supported · compiles today

mynttry { } catch err { } finally { }
1try {2    let customer = load Customer(123)3} catch err {4    log.error(err.message)5} finally {6    log.audit("Done")7}
suitescriptoutput, trimmed
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

Published on npm since 0.1.0. Verified with mynt build on 13 Oct 2026.

  1. Reached the compiler.
  2. Published in Mynt 0.1.0.
C

No SuiteScript method of its own.

It compiles to plain JavaScript, so there is no Oracle API behind it.