mohr_serialize_merged_master #123

Closed
muellerr wants to merge 84 commits from mohr_serialize_merged_master into mohr_serialize
2 changed files with 5 additions and 6 deletions
Showing only changes of commit 365f9f8434 - Show all commits

View File

@ -23,8 +23,8 @@ ReturnValue_t ObjectManager::insert( object_id_t id, SystemObjectIF* object) {
} else { } else {
sif::error << "ObjectManager::insert: Object id " << std::hex sif::error << "ObjectManager::insert: Object id " << std::hex
<< (int)id << std::dec << " is already in use!" << std::endl; << (int)id << std::dec << " is already in use!" << std::endl;
exit(0); //This is very severe and difficult to handle in other places. //This is very severe and difficult to handle in other places.
return this->INSERTION_FAILED; std::exit(INSERTION_FAILED);
} }
} }
@ -67,9 +67,9 @@ void ObjectManager::initialize() {
return_value = it->second->initialize(); return_value = it->second->initialize();
if ( return_value != RETURN_OK ) { if ( return_value != RETURN_OK ) {
object_id_t var = it->first; object_id_t var = it->first;
sif::error << "Object " << std::hex << (int) var sif::error << "Object 0x" << std::hex << std::setw(8) <<
<< " failed to initialize with code 0x" << return_value std::setfill('0')<< var << " failed to initialize " <<
<< std::dec << std::endl; "with code 0x" << return_value << std::dec << std::endl;
error_count++; error_count++;
} }
} }

View File

@ -87,7 +87,6 @@ T* ObjectManagerIF::get( object_id_t id ) {
if(objectManager == nullptr) { if(objectManager == nullptr) {
sif::error << "ObjectManagerIF: Global object manager has not " sif::error << "ObjectManagerIF: Global object manager has not "
"been initialized yet!" << std::endl; "been initialized yet!" << std::endl;
std::exit(1);
} }
SystemObjectIF* temp = this->getSystemObject(id); SystemObjectIF* temp = this->getSystemObject(id);
return dynamic_cast<T*>(temp); return dynamic_cast<T*>(temp);