I have a function init_logging.log_uncaught_errors() that I use for
sys.excepthook. Now I also want to call another function (ffi.dlclose())
upon abnormal termination. Is it possible to register multiple
excepthooks, like with atexit.register? Or should I rename/redefine
log_uncaught_errors() so it does both things?
Thank you both. I'll give this a try. I think it would be nice if
the standard library function atexit.register would be improved,
such that the registered functions would not only be called upon
(a) normal program termination, but that one could also register
functions that are called (b) upon error (c) unconditionally. Much
like (a) try - (b) except - (c) finally.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 296 |
Nodes: | 16 (2 / 14) |
Uptime: | 61:32:09 |
Calls: | 6,654 |
Files: | 12,200 |
Messages: | 5,331,534 |