module function · N/error
create()
error.create(options)
Creates a new error.SuiteScriptError object.
- Implementation
- Not started
- Design
- Open for proposals suggest how it should read
A
suitescript api
1error.create({2 message: /* string, required */,3 name: /* string, required */,4 notifyOff: /* boolean, optional */5});
| Parameter | Type | Required | Description |
|---|---|---|---|
| options.message | string | required | Error message text displayed in the Details column of the Execution Log. Sets the value for the SuiteScriptError.message property. The default value is null. |
| options.name | string | required | User-defined error code. You can create a custom name such as "My_Custom_Error" or use the values in the error.Type enum. Sets the value for the SuiteScriptError.name property. |
| options.notifyOff | boolean | optional | Sets whether email notification is suppressed. Sets the value for the SuiteScriptError.notifyOff property. If set to false, the system emails the users identified on the applicable script record's Unhandled Errors subtab when the error is thrown. The default values is false. For additional information about the Unhandled Errors subtab, see Creating a Script Record . |
B
mynt syntax
No Mynt syntax yet.
Nothing in the language compiles to error.create(options) today. How should it read?
C
community proposals
Competing syntax for create, from GitHub Discussions. Select two or more to compare them side by side.
Loading proposals from GitHub…
D
suggest an alternative
Write the Mynt you wish you could write.
A good proposal shows the syntax, the SuiteScript it should become, and argues for it: why it is clearer, how it fits the rest of the language, what it makes harder.
- Clarity. Does it say what happens, without ceremony?
- Consistency. Does it read like
load,saveandRef[field]? - Expressiveness. Does it cover the cases people actually write?
- Honesty. Does it hide a NetSuite cost, such as governance, that a reader should see?