24 const std::string &msg)
36 const std::initializer_list<ModelException::ModelError> &
errors)
46 for (
const auto &error :
errors_)
49 json_error[
"detail"] = error.message;
50 json_error[
"source"][
"pointer"] = error.source_pointer;
51 json_errors.push_back(json_error);
std::vector< ModelError > errors_
const std::vector< ModelError > errors() const
Access the vector of errors.
json json_errors() const
Format the ModelError object(s).
std::string message
The error message.
LEOSACException(const std::string &message)
std::string source_pointer
The "path" to the source of the error.
#define BUILD_STR(param)
Internal macro.
A base class for Leosac specific exception.
ModelException(const std::string &source_pointer, const std::string &msg)
This is an helper constructor that will instanciate a ModelError object from the 2 parameters...