[omniORB] Problem with dynamic_cast on VC6
Bartosz Zembrzuski
Bartosz.Zembrzuski at softax.com.pl
Fri May 21 12:04:07 BST 2004
Duncan Grisby wrote:
> 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) ...
Thanks a lot.
It really helps :)
More information about the omniORB-list
mailing list