diff --git a/include/catch.hpp b/include/catch.hpp index 956c4b30..d49c7461 100644 --- a/include/catch.hpp +++ b/include/catch.hpp @@ -308,7 +308,7 @@ using Catch::Detail::Approx; #endif -#define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION( signature ) +#define CATCH_TRANSLATE_EXCEPTION( signature ) INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( INTERNAL_CATCH_UNIQUE_NAME( catch_internal_ExceptionTranslator ), signature ) // "BDD-style" convenience wrappers #define SCENARIO( ... ) INTERNAL_CATCH_TESTCASE_NO_REGISTRATION(INTERNAL_CATCH_UNIQUE_NAME( ____C_A_T_C_H____T_E_S_T____ ) ) diff --git a/include/internal/catch_interfaces_exception.h b/include/internal/catch_interfaces_exception.h index 43e4fbf4..40b7e59b 100644 --- a/include/internal/catch_interfaces_exception.h +++ b/include/internal/catch_interfaces_exception.h @@ -8,11 +8,16 @@ #ifndef TWOBLUECUBES_CATCH_INTERFACES_EXCEPTION_H_INCLUDED #define TWOBLUECUBES_CATCH_INTERFACES_EXCEPTION_H_INCLUDED +#include "catch_interfaces_registry_hub.h" + +#if defined(CATCH_CONFIG_DISABLE) + #define INTERNAL_CATCH_TRANSLATE_EXCEPTION_NO_REG( translatorName, signature) \ + static std::string translatorName( signature ) +#endif + #include #include -#include "catch_interfaces_registry_hub.h" - namespace Catch { using exceptionTranslateFunction = std::string(*)();