Skip to content

Commit c674005

Browse files
committed
improve error reporting for parsing of easystack file, mention docs URL where it makes sense
1 parent 6448696 commit c674005

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

easybuild/framework/easystack.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,12 @@ def parse(filepath):
136136
# For now, we don't support mixing multiple top_keys, so check that only one was defined
137137
if len(keys_found) > 1:
138138
keys_string = ', '.join(keys_found)
139-
msg = "Specifying multiple top level keys (%s) in one EasyStack file is not supported." % keys_string
139+
msg = "Specifying multiple top level keys (%s) " % keys_string
140+
msg += "in one EasyStack file is currently not supported."
140141
raise EasyBuildError(msg)
141142
elif len(keys_found) == 0:
142143
msg = "Not a valid EasyStack YAML file: no 'easyconfigs' or 'software' top-level key found"
144+
msg += ", see https://docs.easybuild.io/en/latest/Easystack-files.html for documentation."
143145
raise EasyBuildError(msg)
144146
else:
145147
key = keys_found[0]
@@ -184,8 +186,9 @@ def parse_by_easyconfigs(filepath, easyconfigs, easybuild_version=None, robot=Fa
184186
easystack.ec_opts[easyconf_name_with_eb] = easyconfig[easyconf_name]['options']
185187
else:
186188
dict_keys = ', '.join(easyconfig.keys())
187-
msg = "Failed to parse easystack file: expected a dictionary with one key (the EasyConfig name). "
188-
msg += "Instead found keys: %s" % dict_keys
189+
msg = "Failed to parse easystack file: expected a dictionary with one key (the EasyConfig name), "
190+
msg += "instead found keys: %s" % dict_keys
191+
msg += "; see https://docs.easybuild.io/en/latest/Easystack-files.html for documentation."
189192
raise EasyBuildError(msg)
190193

191194
return easystack

0 commit comments

Comments
 (0)