Skip to content
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

Property write failure warning should include the instance's full name #397

Open
kennethloeffler opened this issue Feb 28, 2024 · 0 comments
Labels
good first issue Good for newcomers

Comments

@kennethloeffler
Copy link
Member

kennethloeffler commented Feb 28, 2024

(transferred from the main Rojo repository because the issue turns out to be resolvable by rbx-dom, sorry for possible spam 😅)

When rbx_dom_lua's PropertyDescriptor:write fails to set a property, it creates an Error object containing contextual information that is used to generate warning messages:

if self.scriptability == "ReadWrite" or self.scriptability == "Write" then
local success, err = xpcall(set, debug.traceback, instance, self.name, value)
if success then
return success
else
return false, Error.new(Error.Kind.Roblox, err)
end
end

The information currently included is good for knowing the reason why a property write failed. However, the constructed Error object (and by extension, warning messages derived from it) do not include the instance's full name, so it's not possible to tell on which instance the write was attempted using the message alone.

I think the error should include the instance's full name field and display it in messages, so property writes that fail have a relevant instance full name and may be easier to track down.

@kennethloeffler kennethloeffler added the good first issue Good for newcomers label Feb 28, 2024
@kennethloeffler kennethloeffler transferred this issue from rojo-rbx/rojo Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant