Legacy Issue Number: 15412
Source: Model Driven Solutions ( Ed Willink)
OCL supports definition of constraints, but it is difficult for tools to offer better error messages to a user than 'Constraint <constraint-name> violated for <constrained-element-name>'.
It would be helpful if Constraints had an additional String-valued expression to be evaluated in the context of the error, so that tools could evaluate it and present the result to the user.
Suggest add an optional argument to the (not-optional) constraint name. e.g.
inv ConstraintName('Unable to find ' + self.target.name): ...
Reported: OCL 2.1 — Wed, 11 Aug 2010 04:00 GMT
Updated: Thu, 8 Oct 2015 14:11 GMT
OCL25 — OCL Constraint violation messages
- Key: OCL25-29
- OMG Task Force: OCL 2.5 RTF