cope with class exceptions

This commit is contained in:
Guido van Rossum 1995-03-22 12:17:10 +00:00
parent ee6310a4de
commit 795a48cd4e
1 changed files with 3 additions and 1 deletions

View File

@ -381,7 +381,9 @@ def do_exec(win):
except KeyboardInterrupt:
print '[Interrupt]'
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:
msg = msg + ': ' + `sys.exc_value`
if win.insertError: