-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Description
This is a common pattern to enrich an exception with more information:
def foo(x):
try:
bar(x)
except Exception as e:
raise ValueError("foo(): bar failed") from e
def bar(x):
1/x
This is common when a second exception occurs during exception handling:
def foo(x):
try:
bar(x)
except Exception as e:
raise ValueError("some other error")
def bar(x):
1/x
In both cases, ipdb (and pdb) wont let us step up the stack from to find the error in bar. While python 3.11 has Exception.add_note, there will continue to be lots of code using the methods above (and its not always practical to use this).
Can we enhance ipdb to handle both cases?
Metadata
Metadata
Assignees
Labels
No labels
