exceptions.py 文件源码

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

项目:thrive 作者: intuit 项目源码 文件源码
def info(self):
        """
        @rtype: dict
        @return: Exception name, raiser function and raiser module
        """
        sr = super(ThriveBaseException, self).__repr__()
        try:
            callframe = inspect.trace()[-1]
            origin_funcname = callframe[3]
            origin_module = os.path.basename(callframe[1])
        except IndexError:
            origin_funcname = origin_module = ""

        return {"exception": sr, "function": origin_funcname, "module": origin_module}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号