Skip to content

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

Open
serhiy-storchaka wants to merge 4 commits into
python:mainfrom
serhiy-storchaka:chain-exceptions
Open

gh-73180: Chain exceptions rather than dropping the old exception.#2072
serhiy-storchaka wants to merge 4 commits into
python:mainfrom
serhiy-storchaka:chain-exceptions

Conversation

@serhiy-storchaka

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

Copy link
Copy Markdown
Member

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

Copy link
Copy Markdown

@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

vstinner commented Nov 6, 2017

Copy link
Copy Markdown
Member

Can you please rebase your change @serhiy-storchaka ?

@serhiy-storchaka

Copy link
Copy Markdown
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
Copy Markdown

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

@MaxwellDupre MaxwellDupre left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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
Copy Markdown
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

vstinner commented Apr 5, 2023

Copy link
Copy Markdown
Member

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
Copy Markdown

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