12.4+ change to error handling on for each/finds values

Nat

New Member
We are just going through testing a move to 12.8 from 12.1 and came across a change which maybe of interest to others.
Seems a bug has been fixed but in our terms has created a new bug!!

The bug that has been fixed is the below prior to 12.4 will not error - (progress article 000212696)
DEF VAR w AS CHAR NO-UNDO.
w = "foo".
FOR EACH Customer WHERE Customer.CustNum EQ INTEGER("foo"):
END.

The above makes perfect sense that it should error and while trying to work out .

The issue is the following will also error (or anything similar where you are checking a value to do something conditional in the find/for each):
DEF VAR w AS CHAR NO-UNDO.
w = "foo".
FOR EACH Customer WHERE Customer.CustNum EQ (IF w = 'foo' THEN 0 ELSE INTEGER("foo")):
END.

Is evaluating the values and erroring before evaluating the condition and then evaluating relevant values to the query.
Have logged with Progress when I worked out why things were at time giving odd results who pointed me at the article.

There is a startup param that can be used to turn this off -zNoQryExpErrors
 
Last edited:
Back
Top