"Kevin Grigorenko" <ke***@myplaceonline.com> wrote...
I've been using Visual Studio.NET for some time, and I had this
definition of a function in a class:
void throwIt(int id, ErrorType type, ...) throw(...);
There is no exception specification "throw(...)". It's either
"throw()" to state that the function throws _nothing_ or it's
omitted to state that it can throw _anything_.
I am trying to port my code over to linux to work with G++, and I
received this error:
parse error before `...' token
Am I using non-standard code here?
Yes. If you want to claim that your function can/will throw
_anything_, just leave the exception specification out:
void throwIt(int, ErrorType, ...);
Also, make sure your compiler actually understands exception
specifications before attempting to use them.
Victor