add an extra parameter hints to format_error

This commit is contained in:
ToruNiina
2018-12-27 16:26:23 +09:00
parent b5b8830c29
commit ee3424ad51

View File

@@ -801,17 +801,20 @@ inline bool operator>=(const toml::value& lhs, const toml::value& rhs)
}
inline std::string format_error(const std::string& err_msg,
const toml::value& v, const std::string& comment)
const toml::value& v, const std::string& comment,
std::vector<std::string> hints = {})
{
return detail::format_underline(err_msg, detail::get_region(v), comment);
return detail::format_underline(err_msg, detail::get_region(v), comment, hints);
}
inline std::string format_error(const std::string& err_msg,
const toml::value& v1, const std::string& comment1,
const toml::value& v2, const std::string& comment2)
const toml::value& v2, const std::string& comment2,
std::vector<std::string> hints = {})
{
return detail::format_underline(err_msg, detail::get_region(v1), comment1,
detail::get_region(v2), comment2);
detail::get_region(v2), comment2,
hints);
}
}// toml