def handler(signum, frame):
# logs message with level debug on this logger
if signum == signal.SIGXCPU:
# when process reaches soft limit --> a SIGXCPU signal is sent
# (it normally terminats the process)
raise CpuTimeoutException
elif signum == signal.SIGALRM:
# SIGALRM is sent to process when the specified time limit to an alarm function elapses
# (when real or clock time elapses)
raise TimeoutException
raise AnythingException
exceptions.py 文件源码
python
阅读 28
收藏 0
点赞 0
评论 0
评论列表
文章目录