-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
More accurate error messages when failing to set properties #315
Conversation
The new message (following the example from issue #249) looks like this, thus no longer providing false information to the developer. |
Instead of |
This seems overly verbose; I would suggest trimming down the message significantly. The error message duplicates information about what property was set on what instance, so we don't need to include it ourselves. I would suggest: Same for the ID; it'd be better off as Other than that, this change seems to be fine. |
This looks good, we can also combine the two error messages if needed. Initially, I didn't do it because Fusion might prefer having them separate for clearer documentation on different error types. local function setProperty(instance: Instance, property: string, value: any)
local success, err = xpcall(setProperty_unsafe, parseError, instance, property, value)
if not success then
if not pcall(testPropertyAssignable, instance, property) then
-- ...
else
-- invalidPropertyType no longer used
logError("propertySetError", err)
end
end
end What's your take on this? |
I think it's fine to keep the invalidPropertyType error. |
Alright, all the issues should be patched. |
In reference to #249