# *** 以前 ***try: raise IOError, "file error"except IOError, err: print err, 'is handled'# *** 在 3 版本中 ***try: raise IOError("file error")except IOError as err: print(err.__class__.__name__, 'is handled')