From ded4ed507e0c4b2f7dfe87951c568376b3ec6e82 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 2 Apr 2018 22:12:25 -0700 Subject: [PATCH] modules/client/profile: Rewrite m::NOT_FOUND propagation for appropos response. --- modules/client/profile.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/client/profile.cc b/modules/client/profile.cc index ee47a1d97..5c99e7c87 100644 --- a/modules/client/profile.cc +++ b/modules/client/profile.cc @@ -261,6 +261,7 @@ void profile_get(const m::user &user, const string_view &key, const m::user::profile_closure &closure) +try { const m::user::room user_room { @@ -278,6 +279,15 @@ profile_get(const m::user &user, closure(value); }); } +catch(const m::NOT_FOUND &e) +{ + throw m::NOT_FOUND + { + "Nothing about '%s' and/or profile for '%s'", + key, + string_view{user.user_id} + }; +} m::event::id::buf profile_set(const m::user &user,