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 statement on function level

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
dread Posted - Jun 14 2007 : 5:39:38 PM
Hi,

So the problem is when I want to use try catch statement on function level (a class method). vax underlines every class method as well as class member variables:
void CXSimApp::OnCreateDevice(LPDIRECT3DDEVICE9 pDevice )
try
{
	if ( !m_ResManager.InsertResource(&m_hMesh, new CMeshResource(pDevice, ".\\\\mesh\\\\maluchz.x", CMeshResource::OPTIMIZE)) )
		return;	

	if (m_model)
	{
		for (unsigned i = 0; i < m_numModels; ++i)
		{
			m_model.Release();
		}
	}
	
	m_model = new CMeshInstance[m_numModels];
	for (DWORD i = 0; i < m_numModels; ++i)
		m_model.SetMesh(dynamic_cast<CMeshResource *>(m_ResManager.GetResource(m_hMesh))->GetMesh() );
	
	m_camera.Set(D3DXVECTOR3(20.0f, 50.0f, -20.0f), D3DXVECTOR3(0.0f, 0.0f, 10.0f), D3DXVECTOR3(0.0f, 1.0f, 0.0f) );
	m_timer.Start();

	D3DXCreateFont(pDevice, 28, 12, 10, 0, FALSE, ANSI_CHARSET, OUT_TT_ONLY_PRECIS, DEFAULT_QUALITY, 
		DEFAULT_PITCH, TEXT("Times New Roman"), &m_pFont);
	ZeroMemory(&m_textScreen, sizeof(m_textScreen));
	m_textScreen.right = 250;
	m_textScreen.bottom = 120;
}
catch (std::runtime_error &ex) 
{
	MessageBox(NULL, ex.what(), "OnCreateDevice() Exception", MB_OK);
};


Removing try keyword or enclosing the try catch statement with braces helps but ofcourse that's no solution.

version:

VA_X.dll file version 10.3.1555.0 built 2007.04.26
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jun 15 2007 : 2:33:01 PM
I am seeing the same effect here. Thank you for the clear description.

case=1867

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