2020-08-30 15:43:45 +02:00
|
|
|
|
|
|
|
// Copyright Catch2 Authors
|
|
|
|
// Distributed under the Boost Software License, Version 1.0.
|
2022-10-28 11:22:53 +02:00
|
|
|
// (See accompanying file LICENSE.txt or copy at
|
2020-08-30 15:43:45 +02:00
|
|
|
// https://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
|
|
|
|
// SPDX-License-Identifier: BSL-1.0
|
2020-08-29 20:48:32 +02:00
|
|
|
#ifndef CATCH_EXCEPTION_TRANSLATOR_REGISTRY_HPP_INCLUDED
|
|
|
|
#define CATCH_EXCEPTION_TRANSLATOR_REGISTRY_HPP_INCLUDED
|
2017-07-10 14:25:38 +02:00
|
|
|
|
2020-03-30 10:34:21 +02:00
|
|
|
#include <catch2/interfaces/catch_interfaces_exception.hpp>
|
2021-06-19 20:57:06 +02:00
|
|
|
#include <catch2/internal/catch_unique_ptr.hpp>
|
|
|
|
|
2017-07-10 14:25:38 +02:00
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace Catch {
|
|
|
|
|
|
|
|
class ExceptionTranslatorRegistry : public IExceptionTranslatorRegistry {
|
|
|
|
public:
|
2021-05-12 23:23:02 +02:00
|
|
|
~ExceptionTranslatorRegistry() override;
|
2021-06-19 20:57:06 +02:00
|
|
|
void registerTranslator( Detail::unique_ptr<IExceptionTranslator>&& translator );
|
2018-07-12 14:27:06 +02:00
|
|
|
std::string translateActiveException() const override;
|
2017-07-10 14:25:38 +02:00
|
|
|
|
|
|
|
private:
|
2020-05-25 09:45:24 +02:00
|
|
|
ExceptionTranslators m_translators;
|
2017-07-10 14:25:38 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2020-08-29 20:48:32 +02:00
|
|
|
#endif // CATCH_EXCEPTION_TRANSLATOR_REGISTRY_HPP_INCLUDED
|