Forum Post: RE: CATCH Brain-freeze

  • Thread starter Thread starter stern
  • Start date Start date
Status
Not open for further replies.
S

stern

Guest
The behavior of this code would be the same whether you were using structured error handling or not. The multiple errors come from the fact that the record create and update were not undone - as you all have said. It is not related to the fact that the error is being thrown or re-thrown. For example, if you changed ON ERROR UNDO, THROW to ON ERROR UNDO, LEAVE and you removed the CATCH block, you will see the error 3 times - once on the ASSIGN line where the error is first raised, once when you leave the FOR EACH block and once when you leave the PROCEDURE block (which is the transaction block unless you explicitly code otherwise). So I'd be interested to hear more details on your statement that the additional undoing and throwing has discouraged you from using structured error handling.

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