diff --git a/matrix/homeserver_bootstrap.cc b/matrix/homeserver_bootstrap.cc index 2340db4e3..8996dea01 100644 --- a/matrix/homeserver_bootstrap.cc +++ b/matrix/homeserver_bootstrap.cc @@ -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