handle class exceptions
diff --git a/Lib/tb.py b/Lib/tb.py
index 6b9cd9a..0442ba8 100644
--- a/Lib/tb.py
+++ b/Lib/tb.py
@@ -74,7 +74,10 @@
 		exec(cmd+'\n', globals, locals)
 	except:
 		print '*** Exception:',
-		print sys.exc_type,
+		if type(sys.exc_type) == type(''):
+			print sys.exc_type,
+		else:
+			print sys.exc_type.__name__,
 		if sys.exc_value <> None:
 			print ':', sys.exc_value,
 		print