Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:02:48

0001 
0002 //              Copyright Catch2 Authors
0003 // Distributed under the Boost Software License, Version 1.0.
0004 //   (See accompanying file LICENSE.txt or copy at
0005 //        https://www.boost.org/LICENSE_1_0.txt)
0006 
0007 // SPDX-License-Identifier: BSL-1.0
0008 #ifndef CATCH_INTERFACES_EXCEPTION_HPP_INCLUDED
0009 #define CATCH_INTERFACES_EXCEPTION_HPP_INCLUDED
0010 
0011 #include <catch2/internal/catch_unique_ptr.hpp>
0012 
0013 #include <string>
0014 #include <vector>
0015 
0016 namespace Catch {
0017     using exceptionTranslateFunction = std::string(*)();
0018 
0019     class IExceptionTranslator;
0020     using ExceptionTranslators = std::vector<Detail::unique_ptr<IExceptionTranslator const>>;
0021 
0022     class IExceptionTranslator {
0023     public:
0024         virtual ~IExceptionTranslator(); // = default
0025         virtual std::string translate( ExceptionTranslators::const_iterator it, ExceptionTranslators::const_iterator itEnd ) const = 0;
0026     };
0027 
0028     class IExceptionTranslatorRegistry {
0029     public:
0030         virtual ~IExceptionTranslatorRegistry(); // = default
0031         virtual std::string translateActiveException() const = 0;
0032     };
0033 
0034 } // namespace Catch
0035 
0036 #endif // CATCH_INTERFACES_EXCEPTION_HPP_INCLUDED