EasyLogging++: new anti-UB test and propagating exception

This commit is contained in:
mj-xmr 2021-03-02 09:36:04 +01:00
parent ed506006d2
commit b2c59af84d
No known key found for this signature in database
GPG key ID: C101BF94093451E0
2 changed files with 8 additions and 0 deletions

View file

@ -2026,6 +2026,7 @@ class TypedConfigurations : public base::threading::ThreadSafe {
ELPP_INTERNAL_ERROR("Unable to get configuration [" << confName << "] for level ["
<< LevelHelper::convertToString(level) << "]"
<< std::endl << "Please ensure you have properly configured logger.", false);
throw; // The exception has to be rethrown, to abort a branch leading to UB.
}
}
return it->second;