Project

General

Profile

Bug #10410

Error is thrown outside of topLevelBlock when block-level on error undo, throw is not set

Added by Eduard Soltan 11 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:

History

#1 Updated by Eduard Soltan 11 months ago

start.p

def var obj as AuxClass.

do transaction:
   obj = new AuxClass().

   obj:meth2().
   CATCH ex AS Progress.Lang.Error :
           message 'abc'.
   END CATCH.
end.

AuxClass.cls

USING Progress.Lang.*.

CLASS AuxClass: 
    def temp-table tt1 field f1 as char
                       field f2 as char
                       field f3 as char
                       index idx is unique f1 f2.

    method public void meth1( ):

       def var i as int.
       def var a as int.

       do 1 to 2:
          create tt1.
          ASSIGN tt1.f1 = 'abc'
                 tt1.f2 = 'qwe'
                 tt1.f3 = 'ert'.
       end.

       message "are".
    end method.

    method public void meth2( ):
       for each tt1:
           delete tt1.
       end.

       meth1().

       message 'wer'.
       find first tt1.
       if available(tt1) then do:
          message tt1.f3.
       end.
    end method.
END CLASS.

I seen an bug in a customer application. The key point is to convert the following block into a doTo block and not a simple Java for loop:

do 1 to 2:
   create tt1.
   ASSIGN tt1.f1 = 'abc'
          tt1.f2 = 'qwe'
          tt1.f3 = 'ert'.
end.

However I could not obtain the following result with trunk branch, maybe there is a problem with 9457c.

#3 Updated by Teodor Gorghe 10 months ago

The customer application code was changed and the issue was fixed.

#4 Updated by Eduard Soltan 10 months ago

  • Status changed from New to Internal Test

#5 Updated by Eduard Soltan 10 months ago

  • Status changed from Internal Test to Closed

Also available in: Atom PDF