Handling data errors with the DataAdminErrorHandler class
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
You can use the OpenEdge.DataAdmin.Error.DataAdminErrorHandler class
to display data errors in code that uses the API. The default behavior
is to display all data errors and the stack trace in a message box.
Data errors occur, for example, when a data commit fails validation or from some other data access problem. By default, these errors are not thrown from the service object that generates them because any attempted data updates might still be possible and the issue that caused the failure corrected. However, this error correction is difficult if the error is thrown.
In the following code, added in any block where the API is called,
the Error( ) method on DataAdminErrorHandler displays
the error messages thrown from the DataAminService class
and its related classes:
|