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

Handle errors in user-defined functions #1697

Merged
merged 3 commits into from Sep 25, 2020
Merged

Handle errors in user-defined functions #1697

merged 3 commits into from Sep 25, 2020

Conversation

swryan
Copy link
Contributor

@swryan swryan commented Sep 25, 2020

Summary

User-defined methods (e.g. compute, apply_linear, etc.) are run within a context manager so that any errors that occur in executing that function can be tagged with the component pathname & class.

Logic for write-protection of the input, output and residual vectors while in user-defined functions is now consolidated under this context manager

Related Issues

Backwards incompatibilities

None

New Dependencies

None

@project-bot project-bot bot added this to In progress in OpenMDAO Dev [Read only] Sep 25, 2020
OpenMDAO Dev [Read only] automation moved this from In progress to Reviewer approved Sep 25, 2020
@swryan swryan merged commit 2138c6d into OpenMDAO:master Sep 25, 2020
OpenMDAO Dev [Read only] automation moved this from Reviewer approved to Done Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Need more localized error msg if user is missing arguments to compute
3 participants