Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 throw(...)

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
znakeeye Posted - Jul 15 2007 : 9:39:28 PM
This is a valid function declaration in C++:
void Foo() throw(...) {}


However, when typing the dots you get this (build 1555):
throw(..->)


Quite irritating, yes
12   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Jul 18 2007 : 5:56:37 PM
Thank you for your investigations. I have never heard of or used Lua, so I downloaded version 5.1 tar ball and extracted it locally. I then added the following code to a header file:

#include "C:\\lua-5.1\\src\\lua.h"

class CTestLuaDots
{
	CTestLuaDots();
	~CTestLuaDots();
	void Foo() throw(...);
};

void CTestLuaDots::Foo() throw(...) { }


Note that I have not added Lua to the project include directories, or to the VA stable include directories. Using this test code I am not seeing any problems typing throw(...)

Are you able to reproduce this problem by adding your test code to a test console project.
znakeeye Posted - Jul 18 2007 : 4:38:47 PM
I actually found it! The problem only occurs if some conditions are forfilled:


CMyClass::~CMyClass()
{
   // LUA_API void       (lua_close) (lua_State *L);
   lua_close(m_state);
}

void CMyClass::Foo() throw(..->


Thus, the sequence of tokens is something like this:
1) Class destructor
2) A call to lua_close() in the destructor, or in a class function below it.
3) Function declaration with throw(...) = BOOM!

I think this could be a general bug that could lead to problems in other cases. It's something about that lua_close() function. The full source can be found at www.lua.org.
feline Posted - Jul 18 2007 : 08:11:51 AM
Xtreme ToolkitPro rings vague bells, but off hand I don't remember any major problems with this library.

Which IDE are you using? They offer different evaluation packages for different IDE's, so I probably need to download the package for the IDE you are using:

http://www.codejock.com/downloads/
znakeeye Posted - Jul 18 2007 : 01:15:20 AM
Darn, it does indeed work in a console project. And to make things worse I can't reproduce it in my other project. In this MFC project I'm using this 3rd-party library from Codejock: Xtreme ToolkitPro. I believe I have seen posts here before, related to issues when using this particular library. Perhaps the error is in their code?
feline Posted - Jul 17 2007 : 3:28:48 PM
For me this code compiles quite happily in a cpp file in VS2005:

void Foo() throw(...) {}


since it compiles we probably need to support it, at least slightly

znakeeye if I hold down the dot key when typing this I get:

void Foo() throw(..................) {}

I have checked on two different machines, and get the same result on both. And yes, I do have convert dot to -> turned on, I checked

If you create a new, default console project do you still see this problem? I am trying to work out what could be triggering this in such a reliable manor on your machine.
mwb1100 Posted - Jul 17 2007 : 2:46:13 PM
quote:
Originally posted by bugfix

according to ISOIEC14882-2003 15.4 Exception specifications it's not. you can specify a type_id list and ... is certainly not one.



"throw(...)" as an exception specification is a Microsoft extension.
bugfix Posted - Jul 17 2007 : 11:51:38 AM
according to ISOIEC14882-2003 15.4 Exception specifications it's not. you can specify a type_id list and ... is certainly not one.
znakeeye Posted - Jul 17 2007 : 11:00:33 AM
Oh, I forgot...
catch(...) works as expected.
znakeeye Posted - Jul 17 2007 : 10:52:08 AM
Sidenote: bugfix, throw(...) is indeed correct syntax.

IDE = VS 2005 SP1
VAX = 10.3.1557 (sorry, not 1555 as mentioned above)
Typing speed is not a factor. In fact, if I hold down '.' I get this:
throw(..->->->->->->->->->->->->->->

Hope this helps.
kevinsikes Posted - Jul 16 2007 : 3:22:47 PM
catch(...) is a valid construct, are you seeing the problem with catch as well?
feline Posted - Jul 16 2007 : 08:03:36 AM
For now I am going to avoid getting into semantics

znakeeye which IDE are you using?
Are you typing in a header file or a cpp file?
How easily can you reproduce this problem? Does typing speed seem to be a factor?

This bug should have been fixed a while ago now. We have had a few reports of this since then, but so far I have never been able to reproduce this problem.
bugfix Posted - Jul 16 2007 : 03:59:04 AM
no it's not:)
void Foo() throw() {}
is. and it's a definition not a declaration:P

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