0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-03-17 06:50:23 +01:00

ircd::parse: Add assertive information rather than throwing bad_function_call.

This commit is contained in:
Jason Volk 2018-02-19 16:01:42 -08:00
parent d869c479c6
commit cede265037

View file

@ -107,10 +107,23 @@ ircd::parse::capstan::capstan(const char *&parsed,
inline void
ircd::parse::capstan::operator()(const parse_closure &pc)
try
{
while(!pc(parsed, const_cast<const char *>(read)))
reader(read, stop);
}
catch(const std::bad_function_call &e)
{
throw assertive
{
"Invalid parse (parsed:%p read:%p stop:%p unparsed:%zu remaining: %zu)",
parsed,
read,
stop,
unparsed(),
remaining()
};
}
inline void
ircd::parse::buffer::remove()