Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2015-09-25 16:22:48 +0300
committervng <viktor.govako@gmail.com>2015-09-25 17:17:52 +0300
commit25aaa05cefa9ecdd4ce6e7893786b4bf0eec5366 (patch)
tree1a988724f19463c79b18cbfa738bed7f5c7e26c8 /indexer/mwm_set.cpp
parentc56f4c20b946bf62831e917a695d4e6c7861fdd9 (diff)
[mwm set] Handle file system exceptions when building feature offsets index.
Diffstat (limited to 'indexer/mwm_set.cpp')
-rw-r--r--indexer/mwm_set.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/indexer/mwm_set.cpp b/indexer/mwm_set.cpp
index 71d8bcef0e..1079ba19ff 100644
--- a/indexer/mwm_set.cpp
+++ b/indexer/mwm_set.cpp
@@ -4,6 +4,7 @@
#include "defines.hpp"
#include "base/assert.hpp"
+#include "base/exception.hpp"
#include "base/logging.hpp"
#include "base/stl_add.hpp"
@@ -214,7 +215,18 @@ unique_ptr<MwmSet::MwmValueBase> MwmSet::LockValueImpl(MwmId const & id)
}
}
- return CreateValue(*info);
+ try
+ {
+ return CreateValue(*info);
+ }
+ catch (exception const & ex)
+ {
+ LOG(LERROR, ("Can't create MWMValue for", info->GetCountryName(), "Reason", ex.what()));
+
+ --info->m_numRefs;
+ DeregisterImpl(id);
+ return nullptr;
+ }
}
void MwmSet::UnlockValue(MwmId const & id, unique_ptr<MwmValueBase> && p)