summaryrefslogtreecommitdiffstats
path: root/Doc/library/exceptions.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/exceptions.rst')
-rw-r--r--Doc/library/exceptions.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst
index 1217b81..4a57e9c 100644
--- a/Doc/library/exceptions.rst
+++ b/Doc/library/exceptions.rst
@@ -123,7 +123,7 @@ The following exceptions are used mostly as base classes for other exceptions.
try:
...
except SomeException:
- tb = sys.exc_info()[2]
+ tb = sys.exception().__traceback__
raise OtherException(...).with_traceback(tb)
.. method:: add_note(note)