summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c415d83)
* lib/mudpy/misc.py(excepthook): When an uncaught exception is raised
and the attempt to log it fails, try to write it to stdout directly and
also mention the new exception details.
# try to log it, if possible
try:
log(message, 9)
# 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):
def sighook(what, where):