List Info

Thread: C++ and Exeptions: No message-text?!




C++ and Exeptions: No message-text?!
user name
2006-02-22 09:10:25
Frank Schönheit - Sun Microsystems Germany wrote:
> Hi Stephan,
> 
> 
>>(Even if, unfortunately, no 
>>message is set in a given case, you might get more
information by 
>>inspecting what subclass of
com::sun::star::uno::Exception is actually 
>>thrown, by either using C++ RTTI
> 
> 
> Since I tried this myself some time ago: It doesn't
work. No matter what
> exception is caught, C++ RTTI always tells it's an
css.uno.Exception. As
> I've learned, this is because our Exception hierarchy
is not
> polymorphic, thus all those classes aren't different
from RTTI's
> perspective.

Oops, yes, you are right.  The compiler internally uses
dynamic RTTI 
when catching exceptions, but, as you say, typeid on a
non-polymorphic 
type (like the UNO exception classes) only ever returns the
static type.

-Stephan

> Ciao
> Frank

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )