[omniORB] declaration bug affecting rethrowing of CORBA::Exception?

Huw Rogers count0@building2.co.jp
Thu, 08 Feb 2001 19:51:08 +0900


Hi,

This code fails to compile on gcc 2.96/Linux and
CC 5.0/Solaris:

try {
// some method invocation
} catch (const CORBA::Exception &e) {
// do something like print an error
throw e;
}

gcc reports:
CORBA::Exception::Exception (const CORBA::Exception &)' is
protected within this context

CC reports:
Error: CORBA::Exception::Exception(const CORBA::Exception&) is not accessible from
...

This is due to _MSC_VER not being defined
at line 826 of omniORB3/CORBA.h (comment
at that line indicates that this problem was experienced
with MSVC++), which declares the copy ctor
of CORBA:Exception public.

This is probably a bug.

    -Huw