mirror of
https://github.com/catchorg/Catch2.git
synced 2025-11-03 05:29:32 +01:00
Replace throw; with std::rethrow_exception(std::current_exception());
This works around a bug in libcxxrt handling of active exception count that caused std::uncaught_exception() to return true even if there was none. Closes #1028
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
static std::string translatorName( signature )
|
||||
#endif
|
||||
|
||||
#include <exception>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -47,7 +48,7 @@ namespace Catch {
|
||||
std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const override {
|
||||
try {
|
||||
if( it == itEnd )
|
||||
throw;
|
||||
std::rethrow_exception(std::current_exception());
|
||||
else
|
||||
return (*it)->translate( it+1, itEnd );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user