diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-08-04 09:09:54 +0300 |
---|---|---|
committer | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2016-08-04 09:09:54 +0300 |
commit | 021a94715c3e9dd343fef8248b46e7448aa2d7de (patch) | |
tree | 5dfe6d455f41fa46445922f334751af446eb4bcc /indexer/feature_altitude.hpp | |
parent | d90fbb6c9fe7a1ea3afcdb976f48d4f4316fcde3 (diff) |
Implementing better logging in case of errors.
Diffstat (limited to 'indexer/feature_altitude.hpp')
-rw-r--r-- | indexer/feature_altitude.hpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indexer/feature_altitude.hpp b/indexer/feature_altitude.hpp index 8d4071e231..41f1f3a7da 100644 --- a/indexer/feature_altitude.hpp +++ b/indexer/feature_altitude.hpp @@ -100,7 +100,8 @@ public: } template <class TSource> - bool Deserialize(TAltitude minAltitude, size_t pointCount, TSource & src) + bool Deserialize(TAltitude minAltitude, size_t pointCount, string const & countryFileName, + uint32_t featureId, TSource & src) { ASSERT_NOT_EQUAL(pointCount, 0, ()); @@ -113,7 +114,8 @@ public: uint32_t const biasedDelta = coding::DeltaCoder::Decode(bits); if (biasedDelta == 0) { - ASSERT(false, ("Decoded altitude delta is zero. Point number in its feature is", i)); + LOG(LERROR, ("Decoded altitude delta is zero. File", countryFileName, + ". Feature Id", featureId, ". Point number in the feature", i, ".")); m_altitudes.clear(); return false; } @@ -122,8 +124,9 @@ public: m_altitudes[i] = static_cast<TAltitude>(bits::ZigZagDecode(delta) + prevAltitude); if (m_altitudes[i] < minAltitude) { - ASSERT(false, ("A point altitude read from file(", m_altitudes[i], - ") is less than min mwm altitude(", minAltitude, "). Point number in its feature is", i)); + LOG(LERROR, ("A point altitude read from file(", m_altitudes[i], + ") is less than min mwm altitude(", minAltitude, "). File ", + countryFileName, ". Feature Id", featureId, ". Point number in the feature", i, ".")); m_altitudes.clear(); return false; } |