0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 18:22:50 +01:00

ircd:Ⓜ️ Improve error propagation through verify().

This commit is contained in:
Jason Volk 2020-06-04 17:49:49 -07:00
parent a4447054e5
commit 9af12a26e3

View file

@ -461,18 +461,29 @@ try
return ret; return ret;
} }
catch(const m::NOT_FOUND &e) catch(const ctx::interrupted &e)
{ {
log::derror log::error
{ {
"Failed to verify %s because key %s for %s :%s", log, "Failed to verify %s because key %s for %s :%s",
string_view{event.event_id}, string_view{event.event_id},
keyid, keyid,
origin, origin,
e.what() e.what(),
}; };
return false; throw;
}
catch(const std::exception &e)
{
throw m::BAD_SIGNATURE
{
"%s key %s for %s :%s",
string_view{event.event_id},
keyid,
origin,
e.what(),
};
} }
bool bool