0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-29 00:03:45 +02:00

ircd:Ⓜ️:homeserver::bootstrap: Improve error reporting w/ file byte offset.

This commit is contained in:
Jason Volk 2020-10-31 02:39:16 -07:00
parent 038bb33576
commit c17c96d965

View file

@ -293,7 +293,7 @@ try
util::timer stopwatch;
auto it(begin(events));
while(it != end(events))
while(it != end(events)) try
{
// page in the JSON
size_t i(0);
@ -370,6 +370,20 @@ try
ctx::yield();
ctx::interruption_point();
}
catch(const json::parse_error &e)
{
log::critical
{
log, "Bootstrap retired:%zu count:%zu accept:%zu offset:%zu :%s",
vm::sequence::retired,
count,
accept,
std::distance(begin(events).start, it.start),
e.what(),
};
break;
}
// Manual flush of the memtables is required in case the user disabled the
// WAL (which is advised in the documentation). If this isn't run several