Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 problems with Function Try Blocks

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Babak Posted - Nov 10 2006 : 07:53:31 AM
Hallo,

VA_X.dll file version 10.3.1540.0 built 2006.10.27
VAOpsWin.dll version 1.3.3.7
VATE.dll version 1.0.5.9
DevEnv.exe version 7.10.6030.0
msenv.dll version 7.10.6030.0
Font: Courier New 11(Pixels)
Comctl32.dll version 5.82.2900.2982
Windows XP 5.1 Build 2600 Service Pack 2
2 processors

With this code

void tst()
try{
}catch(...){
}

I see in the "List Methods in File" (Alt+M) two methods:
catch(..)
tst()

Babak
5   L A T E S T    R E P L I E S    (Newest First)
Babak Posted - Nov 13 2006 : 11:15:02 AM
quote:
Originally posted by feline

I did try and compile the original code, just to make sure, but that does not compile.




sorry about my untested simplification.

Babak
jorgito11 Posted - Nov 11 2006 : 12:34:07 PM
In your defense, feline, function try blocks aren't used very much. It is mostly used with constructors.
feline Posted - Nov 11 2006 : 10:08:40 AM
I did not know you could do that. It seems I learn something new about C++ every week

I did try and compile the original code, just to make sure, but that does not compile. Your version does compile quite happily.

case=1867
jpizzi Posted - Nov 11 2006 : 12:47:20 AM
Sorry, feline. The code that Babak posted is valid C++. Try this:

void myFunc( int z )
try { int x = 1; }
catch (...)
{
// body of function
}

I remember there being a bug already reported on this. I no longer have access to the bug database, so I can't look for it.
feline Posted - Nov 10 2006 : 10:54:56 AM
If this code is not inside a function then I see the same thing. Change the code to:

void tst()
{
    try{
    }catch(...){
    }
}

and the problem goes away.

A try / catch block outside of a function does not compile, which helps explain why VA does not understand this.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000