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

38 lines
1.2 KiB
C++
Raw Normal View History

2011-04-20 15:40:40 +01:00
/*
* Created by Phil on 20/04/2011.
* Copyright 2011 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef TWOBLUECUBES_CATCH_INTERFACES_EXCEPTION_H_INCLUDED
#define TWOBLUECUBES_CATCH_INTERFACES_EXCEPTION_H_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 // TWOBLUECUBES_CATCH_INTERFACES_EXCEPTION_H_INCLUDED