1
0
forked from fsfw/fsfw

increaed exception safety

This commit is contained in:
2021-03-04 18:45:32 +01:00
parent a56cf43897
commit 227074fd4d
2 changed files with 31 additions and 8 deletions

View File

@ -37,15 +37,20 @@ LocalPoolObjectBase::LocalPoolObjectBase(object_id_t poolOwner, lp_id_t poolId,
if(poolId == PoolVariableIF::NO_PARAMETER) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::warning << "LocalPoolVar<T>::LocalPoolVar: 0 passed as pool ID, "
<< "which is the NO_PARAMETER value!" << std::endl;
"which is the NO_PARAMETER value!" << std::endl;
#else
sif::printWarning("LocalPoolVar<T>::LocalPoolVar: 0 passed as pool ID, "
"which is the NO_PARAMETER value!\n");
#endif
}
HasLocalDataPoolIF* hkOwner = objectManager->get<HasLocalDataPoolIF>(poolOwner);
if(hkOwner == nullptr) {
#if FSFW_CPP_OSTREAM_ENABLED == 1
sif::error << "LocalPoolVariable: The supplied pool owner did not "
<< "implement the correct interface"
<< " HasLocalDataPoolIF!" << std::endl;
sif::error << "LocalPoolVariable: The supplied pool owner did not implement the correct "
"interface HasLocalDataPoolIF!" << std::endl;
#else
sif::printError( "LocalPoolVariable: The supplied pool owner did not implement the correct "
"interface HasLocalDataPoolIF!\n");
#endif
return;
}