aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/testsuite_hooks.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/testsuite_hooks.cc')
-rw-r--r--libstdc++-v3/testsuite/testsuite_hooks.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/libstdc++-v3/testsuite/testsuite_hooks.cc b/libstdc++-v3/testsuite/testsuite_hooks.cc
index e12a9b41f59..f503979b65d 100644
--- a/libstdc++-v3/testsuite/testsuite_hooks.cc
+++ b/libstdc++-v3/testsuite/testsuite_hooks.cc
@@ -137,7 +137,7 @@ namespace __gnu_test
std::string w(wanted);
if (w != s)
- throw std::runtime_error(s);
+ __throw_exception_again std::runtime_error(std::string(s));
}
@@ -184,7 +184,8 @@ namespace __gnu_test
VERIFY( preLC_ALL == postLC_ALL );
}
else
- throw environment_variable(string("LC_ALL for ") + string(name));
+ __throw_exception_again
+ environment_variable(string("LC_ALL for ") + string(name));
}
void
@@ -209,7 +210,8 @@ namespace __gnu_test
setenv(env, oldENV ? oldENV : "", 1);
}
else
- throw environment_variable(string(env) + string(" to ") + string(name));
+ __throw_exception_again
+ environment_variable(string(env) + string(" to ") + string(name));
#endif
}
@@ -220,6 +222,7 @@ namespace __gnu_test
{
return std::locale(name);
}
+#ifdef __EXCEPTIONS
catch (std::runtime_error& ex)
{
// Thrown by generic and gnu implemenation if named locale fails.
@@ -228,6 +231,7 @@ namespace __gnu_test
else
throw;
}
+#endif
}
int