Make exception logging failures more robust
[mudpy.git] / lib / mudpy / misc.py
index 9e6dd99..02db563 100644 (file)
@@ -2463,14 +2463,9 @@ def excepthook(excepttype, value, tracebackdata):
     # try to log it, if possible
     try:
         log(message, 9)
-    except:
-        pass
-
-    # try to write it to stderr, if possible
-    try:
-        sys.stderr.write(message)
-    except:
-        pass
+    except Exception as e:
+        # try to write it to stderr, if possible
+        sys.stderr.write(message + "\nException while logging...\n%s" % e)
 
 
 def sighook(what, where):