Eric Lemings wrote:
-----Original Message-----
From: Martin Sebor [mailto:[EMAIL PROTECTED] On Behalf Of Martin Sebor
Sent: Wednesday, July 23, 2008 5:47 PM
To: [email protected]
Subject: Re: STDCXX-600

Eric Lemings wrote:
FYI-type stuff.

I've been at this issue for the past couple hours.  Here's what I've
found so far.

My basic test case looks like this:

#include <exceptions>
#include <stdexcept>
int main () {
    try {
        // throw statement (see below)
    } catch (std::exception&) {
    } catch (...) {
    }

    return 0;
}

The following "throw statements" all throw exceptions that are not
getting caught by the compiler's runtime libraries:

a.      _RW::__rw_throw (_RWSTD_ERROR_OUT_OF_RANGE, _RWSTD_FUNC
("main()"), 1, 0);
b.    _RW::__rw_throw_proc (_RWSTD_ERROR_OUT_OF_RANGE, "what");

No clue yet why they are not caught.

The following "throw statement" however is caught properly:

c. char* what = "what"; throw
(_STD::out_of_rang&)_STD::out_of_range
()._C_assign (what, 0);
Have you tried changing this to something like:

     _STD::out_of_range ex;
     ex._C_assign (what, 0);
     throw ex;

I did but I got some sort of weird compile error: invalid goto label or
something like that.

That's most likely because you forgot to establish a scope
for the block of code containing the declaration of x (it's
illegal to jump past a declaration).


Brad.

Reply via email to