anuraguni...@yahoo.com wrote:
but the whole point of catching such exception is that i can print its
value
there are many such exceptions and hence it is not feasible to catch
them all or know them all unless i go thru src code.

If string exceptions are so difficult to use, don't use them! :-)

It would be better to write your own exception class:

class MyException(Exception):
    pass

try:
    raise MyException("Something bad happened!")
except MyException, e:
    print "ERROR: %s" % e
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to