Article View: borland.public.cppbuilder.nativeapi
Article #16829try, __finally
From: Sam S. Firouz
Date: Fri, 25 Apr 2003 19:36
Date: Fri, 25 Apr 2003 19:36
25 lines
1494 bytes
1494 bytes
Hi:
According to the help file, "The __finally keyword specifies actions that
should be taken regardless of how the flow within the preceding __try
exits.". But in the example below the __finally block will not execute if we
get to return statement. Any ideas? Could this be a builder bug?
if the return is within the first try and not the nested one it works fine.
I have tried this in BCB5 Ent. and BCB6 Ent.
try
{
try
{
/* Do something */
if (/* some condition */)
return;
/* Do something */
}
catch (...)
{
/* Do something */
}
}
__finally
{
/* Do something */
}
Technical Details
Message-ID:
<3ea98e27@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,b90d541d44cd5edf,start X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-04-25 12:41:48 PST From: "Sam S. Firouz" <sfirouz@Hotmail.com> Newsgroups: borland.public.cppbuilder.nativeapi Subject: try, __finally Date: Fri, 25 Apr 2003 12:36:08 -0700 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 165.152.92.188 Message-ID: <3ea98e27@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1051299367 165.152.92.188 (25 Apr 2003 12:36:07 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-xit-08!supernews.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail