Message392871
.../Doc/library/exceptions.rst, lines 99-105 has
original ``SomeException`` had we allowed it to propagate to the caller.
try:
...
except SomeException:
tb = sys.exc_info()[2]
raise OtherException(...).with_traceback(tb)
The code example with no markup except indents does not work because without a new indent, the last line is merged with the preceding one as part of the same paragraph.
https://docs.python.org/3.10/library/exceptions.html#BaseException.with_traceback
traceback of the original SomeException had we allowed it to propagate to the caller.
try:
…
except SomeException:
tb = sys.exc_info()[2] raise OtherException(…).with_traceback(tb)
Note also the uneven line spacing, which is different for me here with Firefox that in the web page (also with Firefox). Something different is needed, but I do not know what. |
|
Date |
User |
Action |
Args |
2021-05-04 10:24:38 | terry.reedy | set | recipients:
+ terry.reedy, docs@python |
2021-05-04 10:24:38 | terry.reedy | set | messageid: <1620123878.12.0.914520648709.issue44030@roundup.psfhosted.org> |
2021-05-04 10:24:38 | terry.reedy | link | issue44030 messages |
2021-05-04 10:24:37 | terry.reedy | create | |
|