[omniORB] Problem with dynamic_cast on VC6
Alex Tingle
alex.tingle at bronermetals.com
Wed May 19 12:09:58 BST 2004
Bartosz,
On 19 May 2004, at 10:44, Bartosz Zembrzuski wrote:
> I'm using OmniOrb 4.0.3 (default binary distribution) on Windows 2000
> and VC6.
>
> I got problem using dynamic_cast on CORBA::Exception.
...
> 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<> unless you really, really need to. Why don't
you want to catch SystemException separately?
If you really want to just catch CORBA::Exception, then why not
distinguish between types by using the virtual functions provided?
Example:
catch(CORBA::Exception& ex)
{
cerr<<"Caught CORBA::Exception '"<<ex._name()<<"'."<<endl;
}
-Alex Tingle
More information about the omniORB-list
mailing list