File tree 2 files changed +6
-2
lines changed
doc/data/messages/r/raise-missing-from
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
- - `PEP 3132 <https://www .python.org/dev/peps /pep-3132/ >`_
1
+ - `PEP 3132 <https://peps .python.org/pep-3132/ >`_
Original file line number Diff line number Diff line change @@ -133,7 +133,11 @@ def _is_raising(body: list) -> bool:
133
133
"W0707" : (
134
134
"Consider explicitly re-raising using 'raise NewError(...) from old_error'" ,
135
135
"raise-missing-from" ,
136
- "Python 3's exception chaining means it shows the traceback of the "
136
+ "Python's exception chaining shows the traceback of the "
137
+ "current exception, but also of the original exception. When you raise a "
138
+ "new exception after another exception was caught it's likely that the "
139
+ "second exception is a friendly re-wrapping of the first exception. In such "
140
+ "cases `raise from` provides a better link between the two tracebacks in the final error."
137
141
"current exception, but also the original exception. Not using `raise "
138
142
"from` makes the traceback inaccurate, because the message implies "
139
143
"there is a bug in the exception-handling code itself, which is a "
You can’t perform that action at this time.
0 commit comments