Skip to main content

createError()

Last updated 10/09/2024

createError()

The

createError()
is a function on the
Five
object that is used to indicate an error has occurred. The first parameter is mandatory and can be either an existing error to propagate or a supplied error message. If an existing error has been supplied to propagate, the additional error message is then mandatory as the second parameter.

Available

Client and Server

Function Signature
createError(currentResult: EventResult | message: string, [message: string]);

ParameterTypeDescription
currentResult
|
message
FiveError | stringExisting Five error to propagate or a message
message
Optional
stringThe message to be displayed to the user

Examples

createError()