mirror of
https://github.com/matrix-construct/construct
synced 2024-11-27 01:02:46 +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
15
ircd/info.cc
15
ircd/info.cc
|
@ -96,7 +96,20 @@ ircd::info::versions::versions(const string_view &name,
|
||||||
,semantic{semantic}
|
,semantic{semantic}
|
||||||
,string{'\0'}
|
,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
|
// User provided a string already; nothing else to do
|
||||||
if(strnlen(this->string, sizeof(this->string)) != 0)
|
if(strnlen(this->string, sizeof(this->string)) != 0)
|
||||||
|
|
Loading…
Reference in a new issue