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

Handle exceptions in make_all_devices #58

Open
DiamondJoseph opened this issue May 17, 2023 · 0 comments
Open

Handle exceptions in make_all_devices #58

DiamondJoseph opened this issue May 17, 2023 · 0 comments

Comments

@DiamondJoseph
Copy link
Contributor

(As I understand it): dodal in Artemis/Hyperion lazily instantiates devices when plans that use the devices are required, so as to allow those plans to run regardless of the state of other devices on the beamline, and in this case if a device fails to instantiate the exception should be thrown.

make_all_devices is called by tests and when dodal is imported into Blueapi, which wants to know about all devices and register them to its context eagerly: in an analogous way, Blueapi would like to successfully start but not allow any devices that failed to be instantiated to be used as arguments for plans.

Tangentially related to but potentially opposed to desired behaviour of #3 (Presumably will call make_all_devices, but would be happy allowing an exception to be fatal in this case?)

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 a pull request may close this issue.

1 participant