Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [qvto-dev] QVT 1.3 invalid

Hi, 

Note that the operation should be oclIsInvalid() rather than oclInvalid()


On Mon, Oct 12, 2015 at 12:19 PM, Ed Willink <ed@xxxxxxxxxxxxx> wrote:
Hi

A simple but perhaps not obvious clarification of invalid.

    Regards

        Ed Willink

After 8.17 Null add

8.1.18 Invalid

When an OCL evaluation fails it does not raise an Exception, rather it returns the invalid value. The invalid may be the result of a hard error such as divide-by-zero, or an ordered-collection-index-out-of-bounds or a programming problem such as navigation of a null object.

Every use of a source value by an ImperativeExpression has an implicit assertion that the source value is not invalid, therefore using invalid is an assertion failure.

Initialization of, or assignment to, a variable stores rather than uses the value. invalid may be stored in a variable, however subsequent use of the variable will probably use it and encounter an assertion failure. An invalid value may be tested by the oclInvalid() operation without causing a failure.



_______________________________________________
qvto-dev mailing list
qvto-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/qvto-dev


Back to the top