15 namespace exceptions::detail {
23 auto nb = strlen(msg) + 3;
24 auto ps = str.
size() - rpos;
31 new_msg.
append(ps + 1,
' ');
66 namespace exceptions {
73 : m_msg{msg}, m_rpos{rpos} {}
75 const char *
what() const noexcept {
return m_msg; }
Syntax error with an unformatted message.
Definition: exceptions.hpp:69
syntax_error update(std::string const &str)
Definition: exceptions.hpp:77
const char * what() const noexcept
Definition: exceptions.hpp:93
Raised when trying to access a field that is not defined.
Definition: exceptions.hpp:50
__syntax_error(const char *msg, std::size_t rpos)
Definition: exceptions.hpp:72
lookup_error(const char *msg)
Definition: exceptions.hpp:91
std::string mark_error(std::string const &str, const char *msg, std::size_t rpos)
Format an error message referring to a syntax error.
Definition: exceptions.hpp:20
Raised whenever a problem is detected in the database.
Definition: exceptions.hpp:101
Raised when unexpected problems appear, which should be reported as bugs.
Definition: exceptions.hpp:38
const char * what() const noexcept
Definition: exceptions.hpp:106
syntax_error(const char *msg)
Definition: exceptions.hpp:60
database_error(const char *msg)
Definition: exceptions.hpp:104
Main namespace of the Reactions package.
Definition: all.hpp:22
Raised when an element is not found within a database.
Definition: exceptions.hpp:88
Raised whenever a problem is detected with an input value.
Definition: exceptions.hpp:110
value_error(const char *msg)
Definition: exceptions.hpp:113
missing_fields_error(const char *msg)
Definition: exceptions.hpp:52
const char * what() const noexcept
Definition: exceptions.hpp:75
const char * what() const noexcept
Definition: exceptions.hpp:54
Raised when processing the syntax of reactions and decays.
Definition: exceptions.hpp:58
const char * what() const noexcept
Definition: exceptions.hpp:115
const char * what() const noexcept
Definition: exceptions.hpp:42
internal_error(const char *msg)
Definition: exceptions.hpp:40
const char * what() const noexcept
Definition: exceptions.hpp:62