Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 try catch statement on function level
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

dread
Starting Member

1 Posts

Posted - Jun 14 2007 :  5:39:38 PM  Show Profile  Reply with Quote
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

feline
Whole Tomato Software

United Kingdom
18939 Posts

Posted - Jun 15 2007 :  2:33:01 PM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=1867

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000