Files
Catch2/src/catch2/interfaces/catch_interfaces_exception.hpp

31 lines
966 B
C++
Raw Normal View History

#ifndef CATCH_INTERFACES_EXCEPTION_HPP_INCLUDED
#define CATCH_INTERFACES_EXCEPTION_HPP_INCLUDED
2011-04-20 15:40:40 +01:00
#include <catch2/interfaces/catch_interfaces_registry_hub.hpp>
#include <catch2/internal/catch_compiler_capabilities.hpp>
#include <catch2/internal/catch_unique_ptr.hpp>
2011-04-20 15:40:40 +01:00
#include <string>
#include <vector>
2012-05-15 08:02:36 +01:00
namespace Catch {
2017-07-27 12:24:21 +02:00
using exceptionTranslateFunction = std::string(*)();
2011-04-20 15:40:40 +01:00
struct IExceptionTranslator;
using ExceptionTranslators = std::vector<Detail::unique_ptr<IExceptionTranslator const>>;
2015-12-04 10:20:33 +00:00
2012-05-15 08:02:36 +01:00
struct IExceptionTranslator {
virtual ~IExceptionTranslator();
virtual std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const = 0;
2011-04-20 15:40:40 +01:00
};
2012-05-15 08:02:36 +01:00
struct IExceptionTranslatorRegistry {
virtual ~IExceptionTranslatorRegistry();
2012-05-15 08:02:36 +01:00
virtual std::string translateActiveException() const = 0;
2011-04-20 15:40:40 +01:00
};
} // namespace Catch
2011-04-20 19:09:41 +01:00
#endif // CATCH_INTERFACES_EXCEPTION_HPP_INCLUDED