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:
parent
4c4a94e457
commit
7fde55a4b5
1 changed files with 14 additions and 1 deletions
13
ircd/info.cc
13
ircd/info.cc
|
@ -96,7 +96,20 @@ ircd::info::versions::versions(const string_view &name,
|
|||
,semantic{semantic}
|
||||
,string{'\0'}
|
||||
{
|
||||
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)
|
||||
|
|
Loading…
Reference in a new issue