sagemath / cysignals

cysignals: interrupt and signal handling for Cython
GNU Lesser General Public License v3.0
44 stars 23 forks source link

use logging to log all exceptions #156

Closed kliem closed 2 years ago

kliem commented 2 years ago

155 is difficult to figure out. The reason is simple. The exceptions in rundoctests are caught and printed with

try:
    failures, _ = doctest.testfile(file, module_relative=False, optionflags=flags, parser=parser)
if not failures:
    os._exit(0)
except BaseExcept as E:
    print(E)
finally:
    os._exit(23)

However, the exceptions thrown by sig_on are not of type BaseExcept. We use logging.exception instead.