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.
Catch them all with a bare except and then reraise non-string exceptions: try: raise "abc" except: e, t, tb = sys.exc_info() if not isinstance(e, str): raise print "caught", e -- http://mail.python.org/mailman/listinfo/python-list