onError( )


Adds an event handler that runs when an error occurs.

The onError() function allows you to perform actions after a dataset operation causes an error such as a field failing validation.

The value of the handler's operation property is the name of the function that caused the error.

For example, the operation property could be any of the following:

  • "new"
  • "next"
  • "save"
  • "previous"
Method Declaration
Copy
Method Parameters
handlerfunctionRequired

handler(operation: string, error: DatasetError): void The error handler.

Did this help?