Skip to main content

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]]);


ParameterTypeDescription
resultFiveErrorExisting Five error to propagate.
messagestringThe message to write to the dialog box if an error occurs.
notificationstringThe 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.

Examples

createError()