Could someone please explain how type matching is handled by multiple
catch clauses? Where is the type information stored? I know exeption
handling does not use RTTI, but how is it done? Thanks.

Re: exception handler type match in VC8 by Giovanni

Giovanni
Tue Oct 23 14:43:32 PDT 2007


"John" <Jianghan85@gmail.com> ha scritto nel messaggio
news:1193175051.215306.276580@q5g2000prf.googlegroups.com...
> Could someone please explain how type matching is handled by multiple
> catch clauses? Where is the type information stored? I know exeption
> handling does not use RTTI, but how is it done? Thanks.

There is a video on Channel 9 about C++ and exceptions.

You may find this to be interesting:

http://tinyurl.com/yr5kl7

Giovanni




Re: exception handler type match in VC8 by Cholo

Cholo
Tue Oct 23 19:32:05 PDT 2007

Adding to Giovanni comments:

How a C++ compiler (VC) implements exception handling
http://www.codeproject.com/cpp/exceptionhandler.asp

--
Cholo Lennon
Bs.As.
ARG

"John" <Jianghan85@gmail.com> escribió en el mensaje
news:1193175051.215306.276580@q5g2000prf.googlegroups.com...
> Could someone please explain how type matching is handled by multiple
> catch clauses? Where is the type information stored? I know exeption
> handling does not use RTTI, but how is it done? Thanks.
>



Re: exception handler type match in VC8 by Ulrich

Ulrich
Wed Oct 24 00:16:26 PDT 2007

John wrote:
> Could someone please explain how type matching is handled by multiple
> catch clauses?

The first one matching is invoked. Note that typical derived-to-base
conversions are performed.

> Where is the type information stored? I know exeption handling does
> not use RTTI, but how is it done?

Exception handling typically does use the RTTI mechanisms plus some more for
non-polymorphic types.

Uli


Re: exception handler type match in VC8 by Doug

Doug
Wed Oct 24 12:17:44 PDT 2007

On Wed, 24 Oct 2007 09:16:26 +0200, Ulrich Eckhardt
<eckhardt@satorlaser.com> wrote:

>Exception handling typically does use the RTTI mechanisms plus some more for
>non-polymorphic types.

I'm not sure how VC does this, but it implemented EH a couple of versions
before RTTI. Maybe the Codeproject article Cholo linked to has the details.

--
Doug Harrison
Visual C++ MVP

Re: exception handler type match in VC8 by Carl

Carl
Wed Oct 24 13:12:24 PDT 2007

"Doug Harrison [MVP]" <dsh@mvps.org> wrote in message
news:7f6vh31vcup5u6abkfk0btb0nj0egq6noq@4ax.com...
> On Wed, 24 Oct 2007 09:16:26 +0200, Ulrich Eckhardt
> <eckhardt@satorlaser.com> wrote:
>
>>Exception handling typically does use the RTTI mechanisms plus some more
>>for
>>non-polymorphic types.
>
> I'm not sure how VC does this, but it implemented EH a couple of versions
> before RTTI. Maybe the Codeproject article Cholo linked to has the
> details.

In VC++ there are essentially two different RTTI mechanisms - one for EH and
one for dynamic_cast (etc). They're similar, but distinct. I would imagine
that a newer compiler would use a single mechanism for both needs - I'd be
interested to learn how VC++ deals with this on 64 bit systems where it has
a much newer back end and no legacy codebase demanding backwards
compatibility.

-cd