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:
parent
d869c479c6
commit
cede265037
1 changed files with 13 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue