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

useVModel: update error messages to help locate issue easier #390

Open
nandi95 opened this issue Jan 17, 2022 · 0 comments
Open

useVModel: update error messages to help locate issue easier #390

nandi95 opened this issue Jan 17, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@nandi95
Copy link
Contributor

nandi95 commented Jan 17, 2022

from the instance.type.name? we might be able to get the component name.
This could be displayed to the user when an error occurs.
If the error occurs in a build in component ('UI'[upper case letter]) then we know it's used internally so we can go and test the parent by `instance.parent?.type?.name. We can display this, however if this again starts with the above pattern we should try to recursively find a parent with a name defined that isn't matching this pattern. This can slo be displayed as an approximation to tell where the issue originates from.

Scenarios to consider:

  • user imports the useVModel on it's own and uses it but an error occurs
  • user uses a UIInput component of which the parent is written by the user and it has name
  • user uses a UIInput component of which the parent is written by the user and it does not have a name
  • user uses a UIInput component inside a UIPanel component
@nandi95 nandi95 added the enhancement New feature or request label Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant