Issue 1082: Generated operations returning attributes/references should not raise Cons (mof-rtf) Source: (, ) Nature: Uncategorized Issue Severity: Summary: Summary: The generated IDL for the MOF includes ConstraintError in the raises clause of operations generated via the Attribute Template and Reference Template, although these templates do not include spcification of that exception (identified in a separate issue). When that specification is updated, it should specify that the generated "read" operations do not raise this exception. The current IDL has ConstraintError in the raises clause of the following operations, which do not change the state of the model: Resolution: Revised Text: Actions taken: March 18, 1998: received issue July 23, 1999: deferred, pending issue 2181 Discussion: Response: The situation is more complex than it seems. What should we do if we discover that the current value of an Attribute or Reference violates the applicable Constraints? Do we raise the ConstraintError exception, or just return the value and not warn the user thatthe value is violating the model's constraints? Deferred pending specification of Constraint verification. (#1085). Implementation: This issue is mostly superceded by the overhaul of the exceptions in which ConstraintError is rolled into MofError; see “Issue 1085: Consider a better approach to generated exceptions (mof-rtf)”. Implementation: However, we should not rule out constraint errors occuring in At-tribute / Reference read operations. In particular, when the At-tribute or referenced Association is derived. This is discussed in Section 4.11.5, “Access operations should avoid raising Constraint exceptions,” on page 4-23. Done [SC] End of Annotations:===== Return-Path: From: "Khalsa, GK" To: issues@omg.org, mof-rtf@omg.org Subject: MOF-RTF: Generated operations returning attributes/references sh ould not raise ConstraintError Date: Wed, 18 Mar 1998 13:29:34 -0500 The generated IDL for the MOF includes ConstraintError in the raises clause of operations generated via the Attribute Template and Reference Template, although these templates do not include spcification of that exception (identified in a separate issue). When that specification is updated, it should specify that the generated "read" operations do not raise this exception. The current IDL has ConstraintError in the raises clause of the following operations, which do not change the state of the model: StructuralFeature::multiplicity() Operation::exceptions() TypeAlias::multiplicity() AssociationEnd::multiplicity() Parameter::multiplicity() The IDL should be revised to remove the ConstraintError exception from the raises clauses of these operations. If the MOF cannot insure that these operations are query operations, then they may not be reliably used to implement constraints which enforce invariants. For distributed objects, that will make constraint evaluation difficult or impossible.