diff options
Diffstat (limited to 'storage/diff_scheme')
-rw-r--r-- | storage/diff_scheme/diff_manager.cpp | 17 | ||||
-rw-r--r-- | storage/diff_scheme/diff_manager.hpp | 2 |
2 files changed, 17 insertions, 2 deletions
diff --git a/storage/diff_scheme/diff_manager.cpp b/storage/diff_scheme/diff_manager.cpp index d6dfcb63df..ce5fe7995a 100644 --- a/storage/diff_scheme/diff_manager.cpp +++ b/storage/diff_scheme/diff_manager.cpp @@ -51,8 +51,8 @@ void Manager::ApplyDiff(ApplyDiffParams && p, std::function<void(bool const resu { m_workerThread.Push([this, p, task] { - CHECK(p.m_diffFile, ()); - CHECK(p.m_oldMwmFile, ()); + CHECK(p.m_diffFile, ("No diff at path:", p.m_diffFile->GetPath(MapOptions::Diff))); + CHECK(p.m_oldMwmFile, ("No old mwm at path:", p.m_oldMwmFile->GetPath(MapOptions::Map))); auto & diffReadyPath = p.m_diffReadyPath; auto & diffFile = p.m_diffFile; @@ -147,5 +147,18 @@ bool Manager::IsPossibleToAutoupdate() const } return true; } + +std::string DebugPrint(Status status) +{ + switch (status) + { + case Status::Undefined: + return "Undefined"; + case Status::Available: + return "Available"; + case Status::NotAvailable: + return "NotAvailable"; + } +} } // namespace diffs } // namespace storage diff --git a/storage/diff_scheme/diff_manager.hpp b/storage/diff_scheme/diff_manager.hpp index 0aa25f95ee..1e9c0a84d9 100644 --- a/storage/diff_scheme/diff_manager.hpp +++ b/storage/diff_scheme/diff_manager.hpp @@ -56,5 +56,7 @@ private: base::ObserverListUnsafe<Observer> m_observers; base::WorkerThread m_workerThread; }; + +std::string DebugPrint(Status status); } // namespace diffs } // namespace storage |