aboutsummaryrefslogtreecommitdiffstats
path: root/src/catch2/generators/catch_generator_exception.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/catch2/generators/catch_generator_exception.hpp')
-rw-r--r--src/catch2/generators/catch_generator_exception.hpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/catch2/generators/catch_generator_exception.hpp b/src/catch2/generators/catch_generator_exception.hpp
new file mode 100644
index 0000000..f353042
--- /dev/null
+++ b/src/catch2/generators/catch_generator_exception.hpp
@@ -0,0 +1,31 @@
+
+// Copyright Catch2 Authors
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE.txt or copy at
+// https://www.boost.org/LICENSE_1_0.txt)
+
+// SPDX-License-Identifier: BSL-1.0
+#ifndef CATCH_GENERATOR_EXCEPTION_HPP_INCLUDED
+#define CATCH_GENERATOR_EXCEPTION_HPP_INCLUDED
+
+#include <exception>
+
+namespace Catch {
+
+ // Exception type to be thrown when a Generator runs into an error,
+ // e.g. it cannot initialize the first return value based on
+ // runtime information
+ class GeneratorException : public std::exception {
+ const char* const m_msg = "";
+
+ public:
+ GeneratorException(const char* msg):
+ m_msg(msg)
+ {}
+
+ const char* what() const noexcept override final;
+ };
+
+} // end namespace Catch
+
+#endif // CATCH_GENERATOR_EXCEPTION_HPP_INCLUDED