Problem Statement
What does 'raise NewError from e' achieve?
Explanation
Using from preserves the cause in the traceback as __cause__. It tells readers why the higher-level error happened.
This is useful when translating low-level errors into domain-specific ones while keeping a clear audit trail.
Code Solution
SolutionRead Only
try:
low()
except OSError as e:
raise RuntimeError('storage failed') from e