0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-29 20:28:52 +02:00

ircd:Ⓜ️:state: Fix db::not_found propagating from nothrow'ing get().

This commit is contained in:
Jason Volk 2018-04-02 22:04:17 -07:00
parent 7b38d216b4
commit 6976119109

View file

@ -10,7 +10,6 @@
#include <ircd/m/m.h> #include <ircd/m/m.h>
/// Convenience to make a key and then get a value /// Convenience to make a key and then get a value
void void
ircd::m::state::get(const string_view &root, ircd::m::state::get(const string_view &root,
@ -64,6 +63,7 @@ ircd::m::state::get(std::nothrow_t,
const string_view &root, const string_view &root,
const json::array &key, const json::array &key,
const val_closure &closure) const val_closure &closure)
try
{ {
bool ret{false}; bool ret{false};
char nextbuf[ID_MAX_SZ]; char nextbuf[ID_MAX_SZ];
@ -91,6 +91,10 @@ ircd::m::state::get(std::nothrow_t,
return ret; return ret;
} }
catch(const db::not_found &e)
{
return false;
}
size_t size_t
ircd::m::state::accumulate(const string_view &root, ircd::m::state::accumulate(const string_view &root,