0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-26 16:52:44 +01:00

ircd::info::version: Handle all closure errors to ensure construction.

This commit is contained in:
Jason Volk 2020-06-13 20:10:26 -07:00
parent 4c4a94e457
commit 7fde55a4b5

View file

@ -96,7 +96,20 @@ ircd::info::versions::versions(const string_view &name,
,semantic{semantic}
,string{'\0'}
{
closure(*this, this->string);
if(closure) try
{
closure(*this, this->string);
}
catch(const std::exception &e)
{
log::error
{
"Querying %s version of '%s' :%s",
type == type::ABI? "ABI"_sv : "API"_sv,
name,
e.what(),
};
}
// User provided a string already; nothing else to do
if(strnlen(this->string, sizeof(this->string)) != 0)