diff options
| author | Martin Hořeňovský | 2017-07-27 12:24:52 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2017-07-27 12:24:52 +0200 |
| commit | 446bad752f7b5c11aa4d0123ee48634ff8314bea (patch) | |
| tree | 8dd54878131b98e68a48bec3fa503bfb05945524 /include | |
| parent | 307eeefa8f0cab5d31059a417f944b6126a19d44 (diff) | |
| download | catch3-446bad752f7b5c11aa4d0123ee48634ff8314bea.tar.gz | |
Move std::exception_ptr out of interfaces
Diffstat (limited to 'include')
| -rw-r--r-- | include/internal/catch_interfaces_registry_hub.h | 2 | ||||
| -rw-r--r-- | include/internal/catch_registry_hub.cpp | 4 | ||||
| -rw-r--r-- | include/internal/catch_tag_alias_autoregistrar.cpp | 2 | ||||
| -rw-r--r-- | include/internal/catch_test_registry.cpp | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/include/internal/catch_interfaces_registry_hub.h b/include/internal/catch_interfaces_registry_hub.h index f71178be..1afbbec7 100644 --- a/include/internal/catch_interfaces_registry_hub.h +++ b/include/internal/catch_interfaces_registry_hub.h @@ -46,7 +46,7 @@ namespace Catch { virtual void registerTest( TestCase const& testInfo ) = 0; virtual void registerTranslator( const IExceptionTranslator* translator ) = 0; virtual void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) = 0; - virtual void registerStartupException( std::exception_ptr const& exception ) noexcept = 0; + virtual void registerStartupException() noexcept = 0; }; IRegistryHub& getRegistryHub(); diff --git a/include/internal/catch_registry_hub.cpp b/include/internal/catch_registry_hub.cpp index 01208e77..454b5e06 100644 --- a/include/internal/catch_registry_hub.cpp +++ b/include/internal/catch_registry_hub.cpp @@ -56,8 +56,8 @@ namespace Catch { void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) override { m_tagAliasRegistry.add( alias, tag, lineInfo ); } - void registerStartupException( std::exception_ptr const& exception ) noexcept override { - m_exceptionRegistry.add(exception); + void registerStartupException() noexcept override { + m_exceptionRegistry.add(std::current_exception()); } private: diff --git a/include/internal/catch_tag_alias_autoregistrar.cpp b/include/internal/catch_tag_alias_autoregistrar.cpp index a2f01cba..35ed059f 100644 --- a/include/internal/catch_tag_alias_autoregistrar.cpp +++ b/include/internal/catch_tag_alias_autoregistrar.cpp @@ -8,7 +8,7 @@ namespace Catch { getMutableRegistryHub().registerTagAlias(alias, tag, lineInfo); } catch (...) { // Do not throw when constructing global objects, instead register the exception to be processed later - getMutableRegistryHub().registerStartupException(std::current_exception()); + getMutableRegistryHub().registerStartupException(); } } diff --git a/include/internal/catch_test_registry.cpp b/include/internal/catch_test_registry.cpp index 28517628..2862879c 100644 --- a/include/internal/catch_test_registry.cpp +++ b/include/internal/catch_test_registry.cpp @@ -29,7 +29,7 @@ namespace Catch { lineInfo)); } catch (...) { // Do not throw when constructing global objects, instead register the exception to be processed later - getMutableRegistryHub().registerStartupException( std::current_exception() ); + getMutableRegistryHub().registerStartupException(); } } } |