Forum Post: RE: Gotchas with ROUTINE-LEVEL in ChUI procedures?

  • Thread starter Thread starter cverbiest
  • Start date Start date
Status
Not open for further replies.
C

cverbiest

Guest
The error-status:error change seems to be an undocumented side-effect Adding routine-level changes the behaviour of your procedures and functions. If the code was written depending on the original behaviour (on error undo, return) instead of the new one (on error undo, return error) this change might not be what you want. I prefer to have block-level on error undo, throw everywhere but it's a change that should not be made without looking at the current error handling within the code. Example, following sample doesn't retry but it will if you comment out the routine-level statement. for each customer on error undo, retry : if retry then disp "retry". disp custnum. run failproc.p. end. /* failproc contains */ /*routine-level on error undo, throw.*/ integer("abc").

Continue reading...
 
Status
Not open for further replies.
Back
Top