Skip to content

gh-73180: Chain exceptions rather than dropping the old exception. #2072

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

serhiy-storchaka
Copy link
Member

@serhiy-storchaka serhiy-storchaka commented Jun 10, 2017

@serhiy-storchaka serhiy-storchaka added the type-feature A feature request or enhancement label Jun 10, 2017
@mention-bot
Copy link

@serhiy-storchaka, thanks for your PR! By analyzing the history of the files in this pull request, we identified @1st1, @loewis and @benjaminp to be potential reviewers.

@vstinner
Copy link
Member

vstinner commented Nov 6, 2017

Can you please rebase your change @serhiy-storchaka ?

@serhiy-storchaka
Copy link
Member Author

For Python/traceback.c I have created a separate bpo-31949. This code looks wrong and needs other changes.

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Feb 19, 2022
Copy link
Contributor

@MaxwellDupre MaxwellDupre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran test suite and got:
401 tests OK.
Looks good.

@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Jul 28, 2022
@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Aug 28, 2022
@arhadthedev
Copy link
Member

The feature seems to be implemented so the PR probably should be closed.

try:
    raise Exception('first exception')
except:
    raise Exception('second exception')
Traceback (most recent call last):
  File "main.py", line 2, in <module>
    raise Exception('first exception')
Exception: first exception

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "main.py", line 4, in <module>
    raise Exception('second exception')
Exception: second exception

@arhadthedev arhadthedev added the pending The issue will be closed if no feedback is provided label Feb 3, 2023
@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Feb 4, 2023
@arhadthedev arhadthedev closed this Mar 4, 2023
@vstinner
Copy link
Member

vstinner commented Apr 5, 2023

The feature seems to be implemented so the PR probably should be closed.

The PR title is misleading. The PR is to keep the previously overridden exception in a bunch of C functions: _ctypes_extend_error(), call_exc_trace(), call_trace_protected().

@vstinner vstinner reopened this Apr 5, 2023
@vstinner vstinner requested a review from markshannon as a code owner April 5, 2023 15:51
@AlexWaygood AlexWaygood changed the title bpo-28994: Chain exceptions rather than dropping the old exception. gh-73180: Chain exceptions rather than dropping the old exception. Apr 5, 2023
@arhadthedev arhadthedev removed the pending The issue will be closed if no feedback is provided label Apr 21, 2023
@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting core review stale Stale PR or inactive for long period of time. type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants