Eric Lemings wrote:
-----Original Message-----
From: Eric Lemings
Sent: Thursday, July 24, 2008 10:57 AM
To: '[email protected]'
Subject: RE: STDCXX-600
...
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. :)
Well I could have sworn I tried that. The following change works:
Index: src/exception.cpp
===================================================================
--- src/exception.cpp (revision 679465)
+++ src/exception.cpp (working copy)
@@ -691,7 +691,11 @@
throw (_STD::length_error&)_STD::length_error ()._C_assign
(what, 0);
case _RWSTD_ERROR_OUT_OF_RANGE:
- throw (_STD::out_of_range&)_STD::out_of_range ()._C_assign
(what, 0);
+ {
+ _STD::out_of_range exc;
+ exc._C_assign (what, 0);
+ throw exc;
+ }
case _RWSTD_ERROR_RUNTIME_ERROR:
throw (_STD::runtime_error&)
Should I just check in this change for this particular exception for
now? I suspect all other standard exceptions would also need to be
changed.
Right. We might as well do them all.
Martin
Brad.