diff options
| author | Martin Hořeňovský | 2020-02-14 10:32:30 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-02-14 16:15:47 +0100 |
| commit | db1a0465dc39e8aed36852984c14072192750b1d (patch) | |
| tree | 33871677f9b2e5177472bcee92a9f107643ed74e /src/catch2/catch_generators.cpp | |
| parent | b2a6523d85ec5f4614acdd3176c2f8ed7a669f7b (diff) | |
| download | catch3-db1a0465dc39e8aed36852984c14072192750b1d.tar.gz | |
Outline GeneratorException from generators header
Diffstat (limited to 'src/catch2/catch_generators.cpp')
| -rw-r--r-- | src/catch2/catch_generators.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/catch2/catch_generators.cpp b/src/catch2/catch_generators.cpp index 0cf55a8d..48d98b92 100644 --- a/src/catch2/catch_generators.cpp +++ b/src/catch2/catch_generators.cpp @@ -6,7 +6,8 @@ */ #include <catch2/catch_generators.hpp> -#include <catch2/catch_random_number_generator.h> +#include <catch2/catch_enforce.h> +#include <catch2/catch_generator_exception.hpp> #include <catch2/catch_interfaces_capture.h> #include <limits> @@ -16,12 +17,16 @@ namespace Catch { IGeneratorTracker::~IGeneratorTracker() {} -const char* GeneratorException::what() const noexcept { - return m_msg; -} - namespace Generators { +namespace Detail { + + [[noreturn]] + void throw_generator_exception(char const* msg) { + Catch::throw_exception(GeneratorException{ msg }); + } +} // end namespace Detail + GeneratorUntypedBase::~GeneratorUntypedBase() {} auto acquireGeneratorTracker( SourceLineInfo const& lineInfo ) -> IGeneratorTracker& { |