Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 try/catch macros confuses VA

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
rogerio.ramos Posted - Sep 16 2013 : 2:47:03 PM
I could narrow down to a simple repro listed below. See [1].
In this example, the variable fence in the expression "fence = fence + 1" in the CATCH block and the other same expression after CATCH_END is marked as not recognized.

If I replace TRY2 by TRY in the tmain code then it will work fine.

Let me know if it repro'es for you.

Thanks,

Rog+?rio Ramos
Microsoft

[1]

#include "stdafx.h"

#define TRY \	try {

#define TRY2	TRY

#define CATCH \	} \	catch (...) \	{

#define CATCH_END \	}

int _tmain(int argc, _TCHAR* argv[])
{
	int fence = 0;

	TRY2
	{
		fence = fence + 1; // recognized
	}
	CATCH
	{
		fence = fence + 1; // Not recognized
	}
	CATCH_END

	fence = fence + 1; // Not recognized

	return 0;
}
3   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Sep 18 2013 : 9:19:06 PM
I'm glad it helped. If you use simplified macros without recursion, you don't even need to keep the recursive parsing on. In fact it is advised to turn it off when using the simplified macros.
rogerio.ramos Posted - Sep 17 2013 : 4:42:29 PM
That indeed helps. Actually the alternative solution to use the VA stdafx.h with simplified versions of the macros worked even better.

Thanks for pointing me those.

Rog+?rio
accord Posted - Sep 17 2013 : 2:47:54 PM
I was able to reproduce the problem here. However, since this is a recursive macro parsing I tried enabling the appropriate setting, and it helped for me:
http://docs.wholetomato.com?W363

This is disabled by default for performance reasons.

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