Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-19-2019, 07:16 AM
rmt rmt is offline
Senior Member
 
Join Date: Jun 2013
Posts: 299
Default How Abort works in delphi5

Dear Expert,

I have two procedures in my delphi5 application as below. Kindly confirm if there goes something wrong while calling Test(1), then will it call Test(2) or Abort from Test(1) itself.

I want something like if there is some problem in Test(1), it should be aborted from then and there itself without processing Test(2).

HTML Code:
Procedure TestCase
begin
Test(1);
Test(2);

end;

Procedure Test(i : integer)
var loopCnt : integer;
vJsonStr : string;
begin
for loopCnt:=1 to 3 do
                begin
                        executeResultS3:=MoveToS3(FilePath+'\SCVF'+'\'+FileName+'.csv',S3BucketPath + bucketFolder);
                        IF (executeResultS3<0) OR (executeResultS3>32) THEN // not failed
                                break
                        ELSE IF loopCnt=3 THEN
                        BEGIN
                                vJsonStr:='{"status":"999","description":"Unable to Move Prediction File to S3"}';
                                RestPost('POST',vJsonStr);
                                Abort;
                        END;
                end;
end;
Thank you so much in advance.
__________________
Rmt
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 12:50 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.