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

More informative error messages #19

Open
jacobpennington opened this issue Jul 15, 2022 · 0 comments
Open

More informative error messages #19

jacobpennington opened this issue Jul 15, 2022 · 0 comments

Comments

@jacobpennington
Copy link
Owner

Often with the current NEMS, errors are difficult to debug because they're primarily raised by dependencies and may have little information relevant to NEMS (beyond hunting through the traceback for NEMS code.

Instead, core nems functions/classes should do some reasonable checks & raise their own errors where appropriate. This isn't necessary everywhere: for example, checking if a key exists in Class.special_dict is unnecessary since the IndexError that a missing key would raise is already straightforward (i.e. the built-in error already gives you the releveant info - missing key - and it's directly tied to that dictionary, rather than separated by 4 levels of other packages). But in cases where a malformed input, missing key, etc. would result in an obtuse error a "long way" down the line, NEMS code should raise its own error.

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

No branches or pull requests

1 participant