1
Livid MOD |
2
Newyorkcity OP |
3
terence4444 2016-09-25 11:42:38 +08:00 via iPhone
except 下面可以 catch 到错误类型,看下文档去吧
|
4
noli 2016-09-25 11:55:57 +08:00
|
5
billlee 2016-09-25 13:04:35 +08:00
try:
... except Exception: type, value, traceback = sys.exc_info() print('{}: {}'.format(type.__name__, value)) |
6
cortexm3 2016-09-25 19:22:05 +08:00
try:
... ... except Exception as e: ... ... |
7
linzhi 2016-09-26 14:28:46 +08:00 1
try:
.... except Exception as e: print traceback.format_exc() continue 这样呢 |