M
Mark
Hi,
We have a class that defines an exception:
template <class A, class B, class C, class D > class X : public Y
{
...
class SomeException : public BaseException
{
...
}
};
We need to catch the exception in another class:
template <class Dispatcher> class Something : public YetAnotherClass
{
Dispatcher *fDispatcher;
void HandleMessage(...)
{
try {
...
} catch (Dispatcher::SomeException) // This line has the error
{
...
}
}
....
[some code omitted for brevity]
This code compiles under Sun Workshop 6 update 2 and under Compaq C++
V6.5-004 for OpenVMS Alpha V7.3-1 but not under GNU C++ V3.3.5 and
2.95.4 (on debian Linux).
The error message is "parse error before ';' token" on the 'catch'
line.
Can anyone tell me if this is a compiler bug or is the syntax
incorrect?
TIA, Mark
We have a class that defines an exception:
template <class A, class B, class C, class D > class X : public Y
{
...
class SomeException : public BaseException
{
...
}
};
We need to catch the exception in another class:
template <class Dispatcher> class Something : public YetAnotherClass
{
Dispatcher *fDispatcher;
void HandleMessage(...)
{
try {
...
} catch (Dispatcher::SomeException) // This line has the error
{
...
}
}
....
[some code omitted for brevity]
This code compiles under Sun Workshop 6 update 2 and under Compaq C++
V6.5-004 for OpenVMS Alpha V7.3-1 but not under GNU C++ V3.3.5 and
2.95.4 (on debian Linux).
The error message is "parse error before ';' token" on the 'catch'
line.
Can anyone tell me if this is a compiler bug or is the syntax
incorrect?
TIA, Mark