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

Use underlying AnsibleError exception as cause #82730

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

webknjaz
Copy link
Member

This has the same effect as doing

raise AnsibleError from UnderlyingError

The exception cause is then available for inspection and shows up in tracebacks.

SUMMARY

Here I'm exploring the possibility of using native Python 3 exception chaining.

ISSUE TYPE
  • Refactoring Pull Request
ADDITIONAL INFORMATION

N/A

@webknjaz webknjaz self-assigned this Feb 21, 2024
@ansibot ansibot added needs_triage Needs a first human triage before being processed. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Feb 21, 2024
@ansibot

This comment was marked as resolved.

@webknjaz webknjaz force-pushed the refactoring/exception-chaining branch from 794572d to ccf6bee Compare February 21, 2024 21:40
@ansibot ansibot added the ci_verified Changes made in this PR are causing tests to fail. label Feb 21, 2024
This has the same effect as doing

    raise AnsibleError from UnderlyingError

The exception cause is then available for inspection and shows up
in tracebacks.
@webknjaz webknjaz force-pushed the refactoring/exception-chaining branch from ccf6bee to 096c695 Compare February 21, 2024 23:07
@ansibot ansibot removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. ci_verified Changes made in this PR are causing tests to fail. labels Feb 21, 2024
@jborean93 jborean93 removed the needs_triage Needs a first human triage before being processed. label Feb 22, 2024
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Mar 7, 2024
@webknjaz webknjaz marked this pull request as ready for review March 19, 2024 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants