File indexing completed on 2025-10-17 07:58:45
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
0022
0023
0024
0025 SurfaceMergingException(std::weak_ptr<const Surface> surfaceA,
0026 std::weak_ptr<const Surface> surfaceB,
0027 const std::string& reason)
0028 : m_surfaceA(std::move(surfaceA)),
0029 m_surfaceB(std::move(surfaceB)),
0030 m_message(std::string{"Failure to merge surfaces: "} + reason) {}
0031
0032
0033
0034 const char* what() const throw() override { return m_message.c_str(); }
0035
0036 private:
0037 std::weak_ptr<const Surface> m_surfaceA;
0038 std::weak_ptr<const Surface> m_surfaceB;
0039 std::string m_message;
0040 };
0041
0042 }