A low-level error rarely says what a user needs to know. A failed int() call is a ValueError, but the real news is that the configuration file is wrong. Good programs convert the first error into a better one, and keep the first as the cause, so nothing is lost. This lesson shows how Python links errors together, how to read the traceback that records where one happened, and how assertions guard the assumptions in your code.
More lessons in Complete Python Programming