C
cverbiest
Guest
In our application when a developer codes a find ... no-error or find-xxx() no-error. The intention is almost always that unavailable should not throw an error. Everything else such as error 7254 or errors about mall formed where clauses should throw an error. It would be very helpful if a new unavailable-no-error option would be added to the language. Adding this to a find statement or method would make the find statement treat no available as a normal condition instead of an error. After a find mybuffer unavailable-no-error the code should check for if available mybuffer. /* sample code using the new option */ find customer where customer.custNum = this-object:currentCustnum unavailable-no-error. if not available customer then message "No customer" this-object:currentCustnum . catch err as progress.lang.error: message "Error occurred" err:getMessage(1). end. The usual catch block can then be used to handle invalid where clauses. It would be easy to refactor our code to use the new unavailable-no-error instead of no-error on find statements. It's nearly impossible to add tests for the other error conditions after every find no-error. related to https://community.progress.com/community_groups/products_enhancements/i/openedge/eliminate_error_7254_and_allow_all_methodproperty_implementations_in_where_clauses.
Continue reading...
Continue reading...