Skip to content

improve error message generated for a missing easyconfig file#1019

Merged
boegel merged 1 commit intoeasybuilders:developfrom
boegel:improve_error_missing_easyconfig
Aug 22, 2014
Merged

improve error message generated for a missing easyconfig file#1019
boegel merged 1 commit intoeasybuilders:developfrom
boegel:improve_error_missing_easyconfig

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Aug 22, 2014

easyconfig filename being looked for is now included in error message:

Failed to find easyconfig file 'imkl-10.3.12.361.eb' when determining module name for: {'dummy': True, 'versionsuffix': '', 'version': '10.3.12.361', 'toolchain': {'version': 'dummy', 'name': 'dummy'}, 'name': 'imkl', 'full_mod_name': None, 'hidden': False, 'short_mod_name': None}

suggestion by @treydock

boegel added a commit that referenced this pull request Aug 22, 2014
improve error message generated for a missing easyconfig file
@boegel boegel merged commit c6af8c6 into easybuilders:develop Aug 22, 2014
@boegel boegel deleted the improve_error_missing_easyconfig branch August 22, 2014 22:15
@kcgthb
Copy link
Copy Markdown
Contributor

kcgthb commented Aug 22, 2014

Oh, I'm jumping on this: can we have some pretty(ier) printing for the "object" too? Having all the attributes in line is kind of difficult to read, especially when there are several missing dependencies. Using pprint maybe?

>>> pprint.pprint(d)
{'dummy': True,
 'full_mod_name': None,
 'hidden': False,
 'name': 'imkl',
 'short_mod_name': None,
 'toolchain': {'name': 'dummy', 'version': 'dummy'},
 'version': '10.3.12.361',
 'versionsuffix': ''}

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Aug 23, 2014

@kcgthb: we need a better approach to error messages all together, to make them more readable; see also #139, please include a comment with your suggestion there

I've been thinking on how to tackle this, and I think we need a dedicated error_reporting module which provides pretty printing functionality for errors. This module could provide functions like fatal_error(msg, err), report_missing_deps(deps), etc. Trying to pretty print things all over the place will be too messy, we need a more centralised approach.

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 this pull request may close these issues.

2 participants