[omniORB] Problem with dynamic_cast on VC6
Duncan Grisby
duncan at grisby.org
Thu May 20 17:16:13 BST 2004
On Wednesday 19 May, Bartosz Zembrzuski wrote:
[...]
> catch(CORBA::Exception& ex)
> {
> CORBA::SystemException* sysExc =
> dynamic_cast<CORBA::SystemException*>(&ex);
[...]
> I know I can catch CORBA::SystemException instead using dynamic_cast but
> I'd rather use dynamic_cast.
>
> Has anybody idea what to do ???
Don't use dynamic_cast<>. Use the exception _downcast functions:
catch (CORBA::Exception& ex) {
CORBA::SystemException* sysExc = CORBA::SystemException::_downcast(&ex);
if (sysExc) ...
Cheers,
Duncan.
--
-- Duncan Grisby --
-- duncan at grisby.org --
-- http://www.grisby.org --
More information about the omniORB-list
mailing list