Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10550


Ignore:
Timestamp:
Aug 27, 2015, 10:41:54 PM (9 years ago)
Author:
landauf
Message:

use try-catch in inner function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/Core.cc

    r10549 r10550  
    274274        for (std::vector<std::string>::const_iterator it = modulePaths.begin(); it != modulePaths.end(); ++it)
    275275        {
    276             try
    277             {
    278                 ModuleInstance* module = new ModuleInstance(*it);
    279                 this->loadModule(module);
    280                 this->modules_.push_back(module);
    281             }
    282             catch (...)
    283             {
    284                 orxout(user_error) << "Couldn't load module \"" << *it << "\": " << Exception::handleMessage() << endl;
    285             }
     276            ModuleInstance* module = new ModuleInstance(*it);
     277            this->loadModule(module);
     278            this->modules_.push_back(module);
    286279        }
    287280
     
    293286        orxout(internal_info) << "Loading module " << module->getLibraryName() << "..." << endl;
    294287
    295         ModuleInstance::setCurrentModuleInstance(module);
    296         DynLib* dynLib = this->dynLibManager_->load(module->getLibraryName());
    297         module->setDynLib(dynLib);
    298 
    299         StaticInitializationManager::getInstance().loadModule(module);
     288        try
     289        {
     290            ModuleInstance::setCurrentModuleInstance(module);
     291            DynLib* dynLib = this->dynLibManager_->load(module->getLibraryName());
     292            module->setDynLib(dynLib);
     293
     294            StaticInitializationManager::getInstance().loadModule(module);
     295        }
     296        catch (...)
     297        {
     298            orxout(user_error) << "Couldn't load module \"" << module->getLibraryName() << "\": " << Exception::handleMessage() << endl;
     299        }
    300300    }
    301301
Note: See TracChangeset for help on using the changeset viewer.