dbg.py 文件源码

python
阅读 34 收藏 0 点赞 0 评论 0

项目:touch-pay-client 作者: HackPucBemobi 项目源码 文件源码
def user_exception(self, frame, info):
        """This function is called if an exception occurs,
        but only if we are to stop at or just below this level."""
        if self._wait_for_mainpyfile or self._wait_for_breakpoint:
            return
        extype, exvalue, trace = info
        # pre-process stack trace as it isn't pickeable (cannot be sent pure)
        msg = ''.join(traceback.format_exception(extype, exvalue, trace))
        # in python3.5, convert FrameSummary to tuples (py2.7+ compatibility)
        tb = [tuple(fs) for fs in traceback.extract_tb(trace)]
        title = traceback.format_exception_only(extype, exvalue)[0]
        # send an Exception notification
        msg = {'method': 'exception', 
               'args': (title, extype.__name__, repr(exvalue), tb, msg), 
               'id': None}
        self.pipe.send(msg)
        self.interaction(frame)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号