File indexing completed on 2025-01-18 09:11:04
0001
0002
0003
0004
0005
0006
0007
0008
0009 #pragma once
0010
0011 #include <exception>
0012 #include <memory>
0013 #include <string>
0014
0015 namespace Acts {
0016 class Surface;
0017
0018
0019 class SurfaceMergingException : public std::exception {
0020 public:
0021 SurfaceMergingException(std::weak_ptr<const Surface> surfaceA,
0022 std::weak_ptr<const Surface> surfaceB,
0023 const std::string& reason)
0024 : m_surfaceA(std::move(surfaceA)),
0025 m_surfaceB(std::move(surfaceB)),
0026 m_message(std::string{"Failure to merge surfaces: "} + reason) {}
0027
0028 const char* what() const throw() override { return m_message.c_str(); }
0029
0030 private:
0031 std::weak_ptr<const Surface> m_surfaceA;
0032 std::weak_ptr<const Surface> m_surfaceB;
0033 std::string m_message;
0034 };
0035
0036 }