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

Make "Must first load config" into exception class #2873

Closed
benclifford opened this issue Aug 24, 2023 · 4 comments
Closed

Make "Must first load config" into exception class #2873

benclifford opened this issue Aug 24, 2023 · 4 comments

Comments

@benclifford
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
This:

parsl/dataflow/dflow.py:            raise RuntimeError('Must first load config')

should be its own exception class so that code trying to detect uninitialized parsl can detect it based on class, rather than on matching strings.

tagging @yadudoc who had some interest in error structuring.

Additional context
cytomining/CytoTable#93

@d33bs
Copy link

d33bs commented Sep 19, 2023

Thank you for the changes related to addressing this issue! The newly added ConfigurationError for cases where Parsl configuration has not yet been loaded provides greater specificity but requires parsing the Exception message in order to make use of it (using either str(ConfigurationException) or ConfigurationException.args[0] to filter the specific message). I'd like to suggest an additional Parsl-specific Exception (perhaps NoConfigurationError, with a parent Exception of ConfigurationException) to help further differentiate specific cases where Parsl configuration has not yet been loaded. See this PR for an example Parsl implementation of where this could make a difference.

@benclifford
Copy link
Collaborator Author

@d33bs have a look at #2890

@d33bs
Copy link

d33bs commented Sep 20, 2023

Thank you @benclifford , I took a look and thought that looked great for this!

@benclifford
Copy link
Collaborator Author

PRs #2878 and #2890 resolve this

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