Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-106670: Allow Pdb to move between chained exceptions#106676

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
iritkatriel merged 12 commits intopython:mainfromCarreau:gh-106670
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Apply suggestions from code review
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
  • Loading branch information
@Carreau@iritkatriel
Carreau andiritkatriel authoredAug 26, 2023
commitb4f79adf771ff80db163a2a097d97fbff8beddca
2 changes: 1 addition & 1 deletionDoc/library/pdb.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -644,7 +644,7 @@ can be overridden by the local file.
List or jump between chained exceptions.

When using ``pdb.pm()`` or ``Pdb.post_mortem(...)`` with a chained exception
instead of a traceback, itwill now allow the user to move between the
instead of a traceback, itallows the user to move between the
chained exceptions using ``exceptions`` command to list exceptions, and
``exception <number>`` to switch to that exception.

Expand Down
7 changes: 3 additions & 4 deletionsLib/pdb.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -1157,7 +1157,7 @@ def do_exceptions(self, arg):
self.message(
"Did not find chained exceptions. To move between"
" exceptions, pdb/post_mortem must be given an exception"
" objectinstead of a traceback."
" objectrather than a traceback."
)
return
if not arg:
Expand DownExpand Up@@ -2004,9 +2004,8 @@ def post_mortem(t=None):
currently being handled (an exception must be being handled if the
default is to be used).

If `t` is an Exception and is a chained exception (i.e it has a __context__,
or a __cause__), pdb will be able to list and move to other exceptions in
the chain using the `exceptions` command
If `t` is an exception object, the `exceptions` command makes it possible to
list and inspect its chained exceptions (if any).
"""
# handling the default
if t is None:
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
Add the new ``exceptions`` command the Pdb debugger to move between chained exceptions when using post mortem debugging.


Add the new ``exceptions`` command to the Pdb debugger. It makes it possible to move between chained exceptions when using post mortem debugging.

[8]ページ先頭

©2009-2025 Movatter.jp