Improve warning and debug output in plugin

This commit is contained in:
Lucien Greathouse
2021-11-20 17:05:45 -05:00
parent e136529ff0
commit 173dc12cb3
2 changed files with 7 additions and 3 deletions

View File

@@ -75,9 +75,13 @@ local function diff(instanceMap, virtualInstances, rootId)
changedProperties[propertyName] = virtualValue
end
else
-- virtualValue can be empty in certain cases, and this may print out nil to the user.
local propertyType = next(virtualValue)
Log.warn("Failed to decode property of type {}", propertyType)
Log.warn(
"Failed to decode property {}.{}. Encoded property was: {:#?}",
virtualInstance.ClassName,
propertyName,
virtualValue
)
end
else
local err = existingValueOrErr