createError()
Last updated 10/05/2023
createError()
The createError()
is a function on the Five
object that is used to prevent something from happening if an error occurs. If specified an optional message and an optional notification are returned to the user.
The first parameter which can be either an existing error to propagate or an error message is mandatory.
Available
Client
and Server
Function Signature
createError(currentResult: EventResult | message: string, [message: string, [notification: string]]);
Parameter | Type | Description |
---|---|---|
result | FiveError | Existing Five error to propagate. |
message | string | The message to write to the dialog box if an error occurs. |
notification | string | The notification to be sent to the user accessed in the toolbar. |
The createError()
is a function to create an error that can be used to return an error.