mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +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;
|
id::room::buf room_id() const;
|
||||||
|
|
||||||
bool is_active() 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 password(const string_view &password);
|
||||||
void activate(const json::members &contents = {});
|
void activate(const json::members &contents = {});
|
||||||
|
|
|
@ -118,7 +118,7 @@ catch(const m::ALREADY_MEMBER &e)
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ircd::m::user::is_password(const string_view &password)
|
ircd::m::user::is_password(const string_view &password)
|
||||||
const
|
const noexcept try
|
||||||
{
|
{
|
||||||
char buf[64];
|
char buf[64];
|
||||||
const auto supplied
|
const auto supplied
|
||||||
|
@ -146,6 +146,19 @@ const
|
||||||
|
|
||||||
return ret;
|
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
|
bool
|
||||||
ircd::m::user::is_active()
|
ircd::m::user::is_active()
|
||||||
|
|
Loading…
Reference in a new issue