catch_exception_translator_registry.h 1011 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * Created by Phil on 20/04/2011.
  3. * Copyright 2011 Two Blue Cubes Ltd. All rights reserved.
  4. *
  5. * Distributed under the Boost Software License, Version 1.0. (See accompanying
  6. * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. */
  8. #ifndef TWOBLUECUBES_CATCH_EXCEPTION_TRANSLATOR_REGISTRY_HPP_INCLUDED
  9. #define TWOBLUECUBES_CATCH_EXCEPTION_TRANSLATOR_REGISTRY_HPP_INCLUDED
  10. #include "catch_interfaces_exception.h"
  11. #include <vector>
  12. #include <string>
  13. #include <memory>
  14. namespace Catch {
  15. class ExceptionTranslatorRegistry : public IExceptionTranslatorRegistry {
  16. public:
  17. ~ExceptionTranslatorRegistry();
  18. virtual void registerTranslator( const IExceptionTranslator* translator );
  19. std::string translateActiveException() const override;
  20. std::string tryTranslators() const;
  21. private:
  22. std::vector<std::unique_ptr<IExceptionTranslator const>> m_translators;
  23. };
  24. }
  25. #endif // TWOBLUECUBES_CATCH_EXCEPTION_TRANSLATOR_REGISTRY_HPP_INCLUDED