-
Notifications
You must be signed in to change notification settings - Fork 98
Fix recursion error when getting error descriptions #282
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
Conversation
…ta, if not found.
This allows us to customize behavior based on whether the caller is “error handling” or not. Specifically, we don’t want to raise if we are already in the midst of handling an error.
Call to error.handle_error changed with new parameter.
# Conflicts: # src/nidmm/metadata/__init__.py # src/nifake/metadata/__init__.py # src/nimodinst/metadata/__init__.py
The mock expectations weren’t correct.
Because it is used in the context of error handling. It now simply returns hardcoded description on failure.
* Add docstring * Add documentation * Return hardcoded description when cannot get it dynamically
# Conflicts: # src/nidmm/metadata/__init__.py # src/nifake/metadata/__init__.py # src/nimodinst/metadata/__init__.py
|
# Conflicts: # docs/nifake/functions.rst
Interesting, and nice catch by system tests. Will need to figure out why this is not caught by NI-FAKE unit tests. |
# Conflicts: # docs/nidmm/functions.rst # docs/nifake/functions.rst # docs/niswitch/functions.rst
This used to test a function that I removed from the generated code, because there’s no good reason for clients to need it. Generated code takes care of getting session descriptions internally when an Error is raised.
Removed the test that was failing. It was calling the method that I removed. I still think removing is the right thing to do. @Fladolcetta if you disagree let me know. |
|
||
def _add_is_error_handling(f): | ||
'''Adds is_error_handling information to the function metadata if it isn't already defined. Defaults to False.''' | ||
# TODO(marcoskirsch): The information is added in functions_addon.py. I think we can instead infer from method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My two <pick your currency> is this way (being explicit) is less error prone.
[X] This contribution adheres to [CONTRIBUTING.md]
What does this Pull Request accomplish?
Why should this Pull Request be merged?
Bugfixes!
What testing has been done?
Unit tests were run locally (tox)