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
Proposals
A
Signature
error.create(options)
Module
N/error
Returns
error.SuiteScriptError
Governance
None
Script types
Server scripts
Version
SuiteScript 2.x, documented for 2.1; since NetSuite 2015.2
call shapefrom Oracle's parameter table
1error.create({2    message:   /* string, required */,3    name:      /* string, required */,4    notifyOff: /* boolean, optional */5});
Oracle reference for this method
ParameterTypeRequiredDescription
options.messagestringrequiredError 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.namestringrequiredUser-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.notifyOffbooleanoptionalSets 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

No Mynt syntax yet.

Nothing in the language compiles to error.create(options) today. How should it read?

C

Competing syntax for create, from GitHub Discussions. Select two or more to compare them side by side.

All discussions

Loading proposals from GitHub…

D

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, save and Ref[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?

N/error · error.create(options)

Suggest syntax for create