handling exceptions

Mark McEahern marklists at mceahern.com
Tue Sep 17 12:52:38 EDT 2002


> The problem is: how can I access the message string of the exception?

try:
  raise RuntimeError("Gee, I wonder what this is?", "Oh, and how about this
too?")
except RuntimeError, e:
  print e

// m

-





More information about the Python-list mailing list