21 #ifndef yap_Exceptions_h
22 #define yap_Exceptions_h
29 namespace exceptions {
44 Exception(
const std::string& what_arg,
const std::string& func_name) : std::exception(),
49 void addFunc(
const std::string& s) noexcept
50 { Func_ += (Func_.empty() ?
"" :
" < ") + s; }
52 const char* what() const noexcept
override
53 {
return (What_ + (What_.empty() or Func_.empty() ?
"" :
" ") + (Func_.empty() ?
"" : std::string(
"from ") + Func_)).data(); }
56 Exception() : std::exception() {}
67 :
Exception(
"Angular momentum not conserved", func_name) {}
84 OutsidePhaseSpace(
const std::string& what_arg =
"",
const std::string& func_name =
"FourMomenta::setSquaredMasses")
102 ParameterIsFixed(
const std::string& what_arg =
"",
const std::string& func_name =
"")
112 :
Exception(
"Resonance unset", func_name) {}
125 :
Exception(
"Inconsistent DataPoint", func_name) {}
134 :
Exception(
"Empty FourMomenta vector", func_name) {}
Definition: Exceptions.h:90
Definition: Exceptions.h:117
Definition: Exceptions.h:130
Definition: Exceptions.h:108
Definition: Exceptions.h:121
Base class for handling YAP exceptions.
Definition: Exceptions.h:39
Definition: Exceptions.h:81
Exception(const std::string &what_arg, const std::string &func_name)
Definition: Exceptions.h:44
Definition: Exceptions.h:63
Definition: Exceptions.h:72
Definition: Exceptions.h:99