mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd:Ⓜ️ Tighten exception specification for user::is_password().
This commit is contained in:
parent
329b1dc514
commit
3d1409b243
2 changed files with 15 additions and 2 deletions
|
@ -35,7 +35,7 @@ struct ircd::m::user
|
|||
id::room::buf room_id() const;
|
||||
|
||||
bool is_active() const;
|
||||
bool is_password(const string_view &password) const;
|
||||
bool is_password(const string_view &password) const noexcept;
|
||||
|
||||
void password(const string_view &password);
|
||||
void activate(const json::members &contents = {});
|
||||
|
|
|
@ -118,7 +118,7 @@ catch(const m::ALREADY_MEMBER &e)
|
|||
|
||||
bool
|
||||
ircd::m::user::is_password(const string_view &password)
|
||||
const
|
||||
const noexcept try
|
||||
{
|
||||
char buf[64];
|
||||
const auto supplied
|
||||
|
@ -146,6 +146,19 @@ const
|
|||
|
||||
return ret;
|
||||
}
|
||||
catch(const m::NOT_FOUND &e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
{
|
||||
log::critical
|
||||
{
|
||||
"user::is_password(): %s %s", string_view{user_id}, e.what()
|
||||
};
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool
|
||||
ircd::m::user::is_active()
|
||||
|
|
Loading…
Reference in a new issue