You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying out this library and made some logic bug (still not sure what at the time of writing). But all the information I get is logic error. For example in this code in parser.cpp:
autoprepare() ->
mutable_buffers_type
{
nprepare_ = 0;
switch(state_)
{
default:
case state::reset:
// reset must be called firstdetail::throw_logic_error();
case state::start:
// start must be called firstdetail::throw_logic_error();
case state::header:
{
BOOST_ASSERT(
m_.h_.size < cfg_->headers.max_size);
std::size_t n = fb_.capacity();
BOOST_ASSERT(n <= cfg_->max_overread());
n = clamp(n, cfg_->max_prepare);
mbp_[0] = fb_.prepare(n);
nprepare_ = n;
returnmutable_buffers_type(&mbp_[0], 1);
}
case state::header_done:
// forgot to call parse()detail::throw_logic_error();
In all these cases it would be better to instead of having a comment propagate that information into the exception. That way the error actually makes some sense and is helpful to figuring out what is wrong. This either needs changing detail::throw_logic_error or a new overload.
@R-Goc, the serializer and parser are currently being redesigned, this issue along with many others has been addressed in the new interface. we'd definitely benefit from your input on the new design.
You can find the redesign documentation in these PRs:
Activity
ashtum commentedon Aug 31, 2026
@R-Goc, the serializer and parser are currently being redesigned, this issue along with many others has been addressed in the new interface. we'd definitely benefit from your input on the new design.
You can find the redesign documentation in these PRs:
The full documentation is also available here (its temporary location until merged into http):