57 std::string message(
const Exception& exception,
const std::string& file,
int line);
64 #define RaiseError(exception) \
65 throw std::runtime_error(Reaktoro::internal::message(exception, __FILE__, __LINE__));
70 #define RuntimeError(errorstr, reasonstr) \
72 Reaktoro::Exception exception; \
73 exception.error << errorstr; \
74 exception.reason << reasonstr; \
75 RaiseError(exception); \
81 #define Assert(condition, errorstr, reasonstr) \
84 Reaktoro::Exception exception; \
85 exception.error << errorstr; \
86 exception.reason << reasonstr; \
87 RaiseError(exception); \
std::stringstream reason
The reason message to be displayed when the exception is raised.
Definition: Exception.hpp:46
The namespace containing all components of the Reaktoro library.
Definition: ChemicalScalar.hpp:24
std::stringstream error
The error message to be displayed when the exception is raised.
Definition: Exception.hpp:43
Provides a convenient way to initialized an exception with helpful error messages.
Definition: Exception.hpp:41