Skip to content

Commit 3607006

Browse files
committed
change wording of exception
1 parent b0c7dbd commit 3607006

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Lib/pdb.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,9 +492,7 @@ def interaction(self, frame, tb_or_exc):
492492

493493
_chained_exceptions, tb = self._get_tb_and_exceptions(tb_or_exc)
494494
if not _chained_exceptions and isinstance(tb_or_exc, BaseException):
495-
raise ValueError(
496-
"A valid traceback must be passed if no exception is being handled"
497-
)
495+
raise ValueError("No exception traceback to inspect")
498496
with self._hold_exceptions(_chained_exceptions):
499497
if self.setup(frame, tb):
500498
# no interaction desired at this time (happens if .pdbrc contains

Lib/test/test_pdb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ def test_post_mortem_single_no_stack():
11321132
... test_function()
11331133
... except ValueError as e:
11341134
... print(e)
1135-
A valid traceback must be passed if no exception is being handled
1135+
No exception traceback to inspect
11361136
"""
11371137

11381138

0 commit comments

Comments
 (0)