File indexing completed on 2025-10-31 08:16:41
0001 
0002 
0003 
0004 
0005 
0006 
0007 
0008 
0009 #include "Acts/Propagator/PropagatorError.hpp"
0010 
0011 #include <string>
0012 
0013 namespace {
0014 
0015 class PropagatorErrorCategory : public std::error_category {
0016  public:
0017   
0018   const char* name() const noexcept final { return "PropagatorError"; }
0019 
0020   
0021   std::string message(int c) const final {
0022     using Acts::PropagatorError;
0023 
0024     switch (static_cast<PropagatorError>(c)) {
0025       case PropagatorError::Failure:
0026         return "Propagation failed";
0027       case PropagatorError::StepCountLimitReached:
0028         return "Propagation reached the configured maximum number of steps";
0029       case PropagatorError::NextTargetLimitReached:
0030         return "Propagation reached the configured maximum number of next "
0031                "target calls";
0032       default:
0033         return "unknown";
0034     }
0035   }
0036 };
0037 
0038 }  
0039 
0040 std::error_code Acts::make_error_code(Acts::PropagatorError e) {
0041   static PropagatorErrorCategory c;
0042   return {static_cast<int>(e), c};
0043 }