To RETURN or to not RETURN? - Forum - OpenEdge Development - Progress Community
 Forum

To RETURN or to not RETURN?

  • Yep* - it’s a good rule to have.
     
     
     
     
    * there’s a lot of muttering under my breath contained in that yup :)
  • Running another statement NO-ERROR also resets the ERROR-STATUS flag. 

    Rick Terrell 
    Principle Consultant, Professional Services 
    Progress

    Sent from my iPhone
  • I worked in a shop in the past where we had a global {&ResetError} preprocessor. All that did was assign something no-error to reset the flag. Horrible. It was everywhere in the code, just before any statement where the code was checking the value of error-status afterwards. A complete mess.

  • Just stop using procedures altogether and only use classes/methods unless the language is forcing you to (e.g. bootstrapping, .p to access AppServer, async callback procedure etc...).

    That seems to work for me ;-)