mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-02 22:36:40 +00:00
Catch exceptions thrown during reference loading (Bug #3238)
This commit is contained in:
parent
b139ad56b7
commit
d0aba0d9ee
1 changed files with 49 additions and 35 deletions
|
@ -462,6 +462,8 @@ namespace MWWorld
|
|||
|
||||
// Load references from all plugins that do something with this cell.
|
||||
for (size_t i = 0; i < mCell->mContextList.size(); i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Reopen the ESM reader and seek to the right position.
|
||||
int index = mCell->mContextList.at(i).index;
|
||||
|
@ -486,6 +488,11 @@ namespace MWWorld
|
|||
mIds.push_back (Misc::StringUtils::lowerCase (ref.mRefID));
|
||||
}
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
std::cerr << "An error occured listing references for cell " << getCell()->getDescription() << ": " << e.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
// List moved references, from separately tracked list.
|
||||
for (ESM::CellRefTracker::const_iterator it = mCell->mLeasedRefs.begin(); it != mCell->mLeasedRefs.end(); ++it)
|
||||
|
@ -509,6 +516,8 @@ namespace MWWorld
|
|||
|
||||
// Load references from all plugins that do something with this cell.
|
||||
for (size_t i = 0; i < mCell->mContextList.size(); i++)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Reopen the ESM reader and seek to the right position.
|
||||
int index = mCell->mContextList.at(i).index;
|
||||
|
@ -531,6 +540,11 @@ namespace MWWorld
|
|||
loadRef (ref, deleted);
|
||||
}
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
std::cerr << "An error occured loading references for cell " << getCell()->getDescription() << ": " << e.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
// Load moved references, from separately tracked list.
|
||||
for (ESM::CellRefTracker::const_iterator it = mCell->mLeasedRefs.begin(); it != mCell->mLeasedRefs.end(); ++it)
|
||||
|
|
Loading…
Reference in a new issue