From 69761191097b04cb832723f4792e84a802bcb516 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 2 Apr 2018 22:04:17 -0700 Subject: [PATCH] ircd::m::state: Fix db::not_found propagating from nothrow'ing get(). --- ircd/m/state.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ircd/m/state.cc b/ircd/m/state.cc index 2601bbc9b..4c559fca0 100644 --- a/ircd/m/state.cc +++ b/ircd/m/state.cc @@ -10,7 +10,6 @@ #include - /// Convenience to make a key and then get a value void ircd::m::state::get(const string_view &root, @@ -64,6 +63,7 @@ ircd::m::state::get(std::nothrow_t, const string_view &root, const json::array &key, const val_closure &closure) +try { bool ret{false}; char nextbuf[ID_MAX_SZ]; @@ -91,6 +91,10 @@ ircd::m::state::get(std::nothrow_t, return ret; } +catch(const db::not_found &e) +{ + return false; +} size_t ircd::m::state::accumulate(const string_view &root,