session.py 文件源码

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

项目:rvmi-rekall 作者: fireeye 项目源码 文件源码
def _HandleRunPluginException(self, ui_renderer, e):
        """Handle all exceptions thrown by logging to the console."""

        if isinstance(e, plugin.InvalidArgs):
            self.logging.fatal("Invalid Args: %s" % e)

        elif isinstance(e, plugin.PluginError):
            self.logging.fatal(str(e))

        elif isinstance(e, KeyboardInterrupt) or isinstance(e, plugin.Abort):
            logging.error("Aborted\r\n")

        else:
            error_status = traceback.format_exc()

            # Report the error to the renderer.
            self.logging.fatal(error_status)

            # If anything goes wrong, we break into a debugger here.
            if self.GetParameter("debug"):
                pdb.post_mortem(sys.exc_info()[2])

            # This method is called from the exception handler - this bare raise
            # will preserve backtraces.
            raise  # pylint: disable=misplaced-bare-raise
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号