Skip to content

Added an error throw for setting magnet with zero length. - #435

Open
gubaidulinvadim wants to merge 1 commit into
mainfrom
fix-zero-length-magnet
Open

gubaidulinvadim wants to merge 1 commit into
mainfrom
fix-zero-length-magnet

Conversation

@gubaidulinvadim

Copy link
Copy Markdown
Member

Closes #360 by introducing a pyAMLException when the user tries to set a zero-length element.

@GamelinAl does this answer your issue?

@gubaidulinvadim gubaidulinvadim added this to the ESRF Workshop milestone Sep 17, 2026
@gubaidulinvadim gubaidulinvadim self-assigned this Sep 17, 2026
@gubaidulinvadim gubaidulinvadim added the bug Something isn't working label Sep 17, 2026
@GamelinAl

Copy link
Copy Markdown
Member

I am not sure. For which reasons we should throw an error instead of making it work with the integrated strength?

@gubaidulinvadim

Copy link
Copy Markdown
Member Author

It is so that it does not fail silently and will not confuse the user. I'd imagine you would also need the length to do the actual conversion to current. There are no thin elements in the control system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Setting a value to a zero-length magnet fails silently

2 participants