raise-missing-from / W0707#
Consider explicitly re-raising using %s'%s from %s'
Python's exception chaining shows the traceback of the current exception, but also of the original exception. When you raise a new exception after another exception was caught it's likely that the second exception is a friendly re-wrapping of the first exception. In such cases `raise from` provides a better link between the two tracebacks in the final error.
try: 1 / 0 except ZeroDivisionError as e: raise ValueError("Rectangle Area cannot be zero") from e
try: 1 / 0 except ZeroDivisionError as e: raise ValueError("Rectangle Area cannot be zero") # [raise-missing-from]
Created by the exceptions checker.