1. Technology

Part 4: Handling Errors the Way You Want

By

4 of 7

Reading Python's Error Message: Part 1

Now, let's consider the error message. Python conveniently gives us a traceback of the execution process with the most recent call listed last. Because each part of this program could be held in separate files, possibly being re-used from other applications, Python tells us in which file, on which line number, and in which function each error occurs. All line numbers are listed relative to the file in which they are found -- not relative to the cumulative number of program lines. As the most recent call is listed last, we know that the error messages are nested, each error after the first occuring within the execution of the previous error.

Click to the next page to look at this message line-by-line.

  1. About.com
  2. Technology
  3. Python
  4. Web Development
  5. RSS Reader in Python - Building an RSS Reader With Python - Reading Python's Error Message

©2014 About.com. All rights reserved.