Question
In Python, which comparison about Exceptions and Custom Errors is accurate?
- There is no practical difference in behavior, performance, or maintainability when Exceptions and Custom Errors is involved.
- Generic exceptions may be enough locally, while custom exception types help callers distinguish meaningful failure categories at boundaries.
- The oldest option related to Exceptions and Custom Errors is always the right production choice regardless of workload or context.
- Differences around Exceptions and Custom Errors are mostly cosmetic, so correctness and debugging quality do not really change.
Hint
Focus on the behavior or tradeoff, not just the keyword.
Answer and rationale
Correct answer: B. Generic exceptions may be enough locally, while custom exception types help callers distinguish meaningful failure categories at boundaries.
Generic exceptions may be enough locally, while custom exception types help callers distinguish meaningful failure categories at boundaries. This is the comparison that usually separates memorization from understanding.
Track: Python