From 449f667dd903fdea0f113da6025e807555171744 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 15 Jul 2019 16:34:02 -0700 Subject: [PATCH] modules/client/rooms/join: Exception handling around bootstrap eval. --- modules/client/rooms/join.cc | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/modules/client/rooms/join.cc b/modules/client/rooms/join.cc index cfe289607..5bc59eb6d 100644 --- a/modules/client/rooms/join.cc +++ b/modules/client/rooms/join.cc @@ -453,7 +453,7 @@ catch(const std::exception &e) { log::error { - join_log, "Bootstrap %s backfill @ %s from %s :%s", + join_log, "join bootstrap %s backfill @ %s from %s :%s", string_view{room_id}, string_view{event_id}, string(host), @@ -463,6 +463,7 @@ catch(const std::exception &e) void bootstrap_eval_state(const json::array &state) +try { m::vm::opts opts; opts.nothrows = -1; @@ -474,9 +475,17 @@ bootstrap_eval_state(const json::array &state) state, opts }; } +catch(const std::exception &e) +{ + log::error + { + join_log, "join bootstrap eval state :%s", e.what(), + }; +} void bootstrap_eval_auth_chain(const json::array &auth_chain) +try { m::vm::opts opts; opts.infolog_accept = true; @@ -486,6 +495,15 @@ bootstrap_eval_auth_chain(const json::array &auth_chain) auth_chain, opts }; } +catch(const std::exception &e) +{ + log::error + { + join_log, "join bootstrap eval auth_chain :%s", e.what(), + }; + + throw; +} void bootstrap_eval_lazy_chain(const json::array &auth_chain)