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

Improve error messages (fix #15) #17

Merged
merged 4 commits into from
Jan 25, 2024
Merged

Conversation

ovallcorba
Copy link
Contributor

This PR Addresses the error handling and messaging pointed out by @marceloalcocer in #15.

An improved explanation message has been included in the case the value is out of the current ior calibration and the local exception handling now re-raises the exception including the message (before it was returning None and it was _read_axis_value of PoolController raising the ValueError general exception). Now the output is the following:

Door_macroserver_1 [100]: dev = tango.DeviceProxy("bl16/ct/bl16ghs01")

Door_macroserver_1 [101]: dev.dummy_MFC_01_set
        Result [101]: 5.0

Door_macroserver_1 [102]: tango_ior01.tangoAttribute
        Result [102]: 'bl16/ct/bl16ghs01/dummy_MFC_01_set'

Door_macroserver_1 [103]: tango_ior01.calibration
        Result [103]: '[[0.9, 1.0, 1.1], [1.9, 2.0, 2.1], [2.9, 3.0, 3.1]]'

Door_macroserver_1 [103]: tango_ior01.value
PyDs_PythonError: ValueError: Value (5.0) out of calibration bounds. Please review ior calibration or write a valid value to the underlying tango attribute: bl16/ct/bl16ghs01.dummy_MFC_01_set

I started with this one but probably other error messages in sardana_tango controllers could be improved as well.

@rhomspuron
Copy link
Contributor

thanks @ovallcorba and @marceloalcocer for do it and report it. We can integrate it.

@ovallcorba ovallcorba merged commit c66ff14 into master Jan 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants