Question 9
Back to Exercise
What does raise ConfigError("bad port") from e do?
- A Raises e instead of ConfigError
- B Suppresses e completely
- C Raises ConfigError and stores e as its __cause__, so both appear in the traceback Correct
- D Raises both exceptions at the same time
Correct Answer: Option C
Chaining keeps the root cause visible while presenting a higher-level error.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!