[FancyZones] logging on the editor exit event (#8422)

This commit is contained in:
Seraphima Zykova
2020-12-05 11:36:31 +03:00
committed by GitHub
parent 0603f2db1a
commit aa3dd133c7
2 changed files with 13 additions and 1 deletions

View File

@@ -1302,6 +1302,7 @@ bool FancyZones::IsSplashScreen(HWND window)
void FancyZones::OnEditorExitEvent() noexcept
{
Logger::trace("OnEditorExitEvent");
// Collect information about changes in zone layout after editor exited.
FancyZonesDataInstance().ParseDataFromTmpFiles();

View File

@@ -6,6 +6,8 @@
#include "trace.h"
#include "util.h"
#include <common/logger/logger.h>
#include <filesystem>
#include <optional>
#include <utility>
@@ -691,6 +693,10 @@ namespace JSONHelpers
{
result = std::move(deviceInfo);
}
else
{
Logger::trace(L"ParseDeviceInfoFromTmpFile: AppliedZonesetsJSON::FromJson parsing error, {}", zoneSetJson.value().Stringify());
}
}
}
@@ -714,11 +720,16 @@ namespace JSONHelpers
{
result.emplace_back(std::move(*customZoneSet));
}
else
{
Logger::trace(L"ParseCustomZoneSetsFromTmpFile: CustomZoneSetJSON::FromJson parsing error, {}", zoneSet.GetObjectW().Stringify());
}
}
}
}
catch (const winrt::hresult_error&)
catch (const winrt::hresult_error& err)
{
Logger::trace(L"ParseCustomZoneSetsFromTmpFile: CustomZoneSetJSON::FromJson parsing error, {}", err.message());
}
DeleteTmpFile(tmpFilePath);