catch_startup_exception_registry.h 866 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Created by Martin on 04/06/2017.
  3. * Copyright 2017 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_STARTUP_EXCEPTION_REGISTRY_H_INCLUDED
  9. #define TWOBLUECUBES_CATCH_STARTUP_EXCEPTION_REGISTRY_H_INCLUDED
  10. #include <vector>
  11. #include <exception>
  12. namespace Catch {
  13. class StartupExceptionRegistry {
  14. #if !defined(CATCH_CONFIG_DISABLE_EXCEPTIONS)
  15. public:
  16. void add(std::exception_ptr const& exception) noexcept;
  17. std::vector<std::exception_ptr> const& getExceptions() const noexcept;
  18. private:
  19. std::vector<std::exception_ptr> m_exceptions;
  20. #endif
  21. };
  22. } // end namespace Catch
  23. #endif // TWOBLUECUBES_CATCH_STARTUP_EXCEPTION_REGISTRY_H_INCLUDED