Skip to content

Commit

Permalink
[FancyZones] logging on the editor exit event (#8422)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeraphimaZykova committed Dec 5, 2020
1 parent 0603f2d commit aa3dd13
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/modules/fancyzones/lib/FancyZones.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
13 changes: 12 additions & 1 deletion src/modules/fancyzones/lib/JsonHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include "trace.h"
#include "util.h"

#include <common/logger/logger.h>

#include <filesystem>
#include <optional>
#include <utility>
Expand Down Expand Up @@ -691,6 +693,10 @@ namespace JSONHelpers
{
result = std::move(deviceInfo);
}
else
{
Logger::trace(L"ParseDeviceInfoFromTmpFile: AppliedZonesetsJSON::FromJson parsing error, {}", zoneSetJson.value().Stringify());
}
}
}

Expand All @@ -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);
Expand Down

0 comments on commit aa3dd13

Please sign in to comment.