Error reason creation using the model editor

Error reasons are used to provide the context for any errors returned to the user. Error reasons can be specified at a folder, attribute, entity, or transaction level within the module model.

The first error reason contained by a transaction is the default error for that transaction. Every transaction must contain at least one error reason, as the default error for that transaction.

When an error reason is contained by an attribute that is defined for an entity extension or entity, then it indicates a possible validation error that may be returned for that attribute.

Default error reasons are automatically added to your model for type codes, attributes of type Timestamp, and primary keys. If you include additional error reasons, skeleton validation code will be generated in the corresponding BObj class for each additional error reason. You can customize the generated skeleton validation methods in order to implement the required validation check.
Important: When you generate code for your custom projects, new identifiers (Start IDs) may be assigned to your error reasons. To verify, view the ID property in the Properties view for a selected error reason. Set the value of the ID property to the suffix of the desired identifier; for example, set the value to 30 if you want to assign the identifier 10200030.


Last updated: 23 October 2014