mirror of
https://github.com/python/cpython.git
synced 2025-09-11 11:17:16 +00:00
cope with class exceptions
This commit is contained in:
parent
ee6310a4de
commit
795a48cd4e
1 changed files with 3 additions and 1 deletions
|
@ -381,7 +381,9 @@ def do_exec(win):
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
print '[Interrupt]'
|
print '[Interrupt]'
|
||||||
except:
|
except:
|
||||||
msg = sys.exc_type
|
if type(sys.exc_type) == type(''):
|
||||||
|
msg = sys.exc_type
|
||||||
|
else: msg = sys.exc_type.__name__
|
||||||
if sys.exc_value <> None:
|
if sys.exc_value <> None:
|
||||||
msg = msg + ': ' + `sys.exc_value`
|
msg = msg + ': ' + `sys.exc_value`
|
||||||
if win.insertError:
|
if win.insertError:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue