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

[Flow] More specific error message if a flow action fails during tick execution #718

Closed
fietser28 opened this issue Feb 5, 2025 · 5 comments
Assignees
Milestone

Comments

@fietser28
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
This is not a bug, but with current generic error messages generated in code by studio (in screens.c) it is very inconvenient
to determine the widget / place where the error occurs.

This is how it looked like after recent #706 testing in my project:

Image

This text currently exist 135 times in my code.

It would be very handy if the text would be something like:
"Failed to evaluate Text in Label widget obj105"

Even if the widget is not explicitly named in studio it is still much easier to determine the exact widget having the problem.

Describe the solution you'd like
Add the object name in the error message.

Describe alternatives you've considered
Manual searching/deduction. Not very successful with large projects.

Additional context
Add any other context or screenshots about the feature request here.

@mvladic mvladic added this to the 0.22.0 milestone Feb 6, 2025
@mvladic
Copy link
Contributor

mvladic commented Feb 6, 2025

Not all widgets have an automatically generated name, ie. only widgets that are referenced in the generated source code get an automatically generated name. So, we need some other way to identify such a widget. One idea is to call LV_LOG_ERROR from the location where throwError function is called so it prints the proper location instead of private.cpp:691.

@fietser28
Copy link
Collaborator Author

One idea is to call LV_LOG_ERROR from the location where throwError function is called so it prints the proper location instead of private.cpp:691.

This will indeed give an explicit pointer to the place in generated code and will certainly help with pinpointing the problem.

mvladic added a commit that referenced this issue Feb 8, 2025
@mvladic
Copy link
Contributor

mvladic commented Feb 8, 2025

Implemented.

Now, error message looks like this:

[Error]	(0.101, +101)	 throwError: EEZ-FLOW error: Failed to evaluate Text in Label widget | 0.4 | /home/mvladic/lvgl/v9-with-flow-no-eez-framework/src/ui/screens.c:103 eez-flow.cpp:10658

Two additional info are now present:

  • Component path, i.e. 0.4
  • Additional source file location, i.e. /home/mvladic/lvgl/v9-with-flow-no-eez-framework/src/ui/screens.c:103

With component path you can find component in Studio by using Find Project Component from Edit menu:

Image

Image

@mvladic
Copy link
Contributor

mvladic commented Feb 8, 2025

The reason why I added "Find Project Component" is because not always additional source location will be present, for example if error is in LVGL action.

@fietser28
Copy link
Collaborator Author

Working for me! Thank you.

@mvladic mvladic closed this as completed Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants