Make "Must first load config" into exception class
benclifford opened this issue · comments
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
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.
Thank you @benclifford , I took a look and thought that looked great for this!