stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Lemings" <Eric.Lemi...@roguewave.com>
Subject RE: STDCXX-600
Date Thu, 24 Jul 2008 16:57:00 GMT
 

> -----Original Message-----
> From: Martin Sebor [mailto:sebor@roguewave.com] 
> Sent: Thursday, July 24, 2008 9:55 AM
> To: dev@stdcxx.apache.org
> Subject: Re: STDCXX-600
> 
> Eric Lemings wrote:
> >  
> > 
> >> -----Original Message-----
> >> From: Martin Sebor [mailto:msebor@gmail.com] On Behalf Of 
> Martin Sebor
> >> Sent: Wednesday, July 23, 2008 5:47 PM
> >> To: dev@stdcxx.apache.org
> >> 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).

I tried that too.  :)

Brad.

Mime
View raw message