def send_exception(self, ident, req_id, exc):
        if __debug__:
            self.log.debug("send_exception ident=%r" % ident)
        exc_type, exc_value, exc_traceback = sys.exc_info()
        if exc_traceback is None:
            exc_format = ""
        else:
            exc_format = "".join(traceback.format_exception(exc_type, exc_value,
                                                    exc_traceback))
        data = {"req_id": req_id, "ok": False,
                "exception": exc, "exception_format": exc_format}
        try:
            self.send(ident, data)
        except self.pickler.PickleError:
            # raise the original exception and not the pickler's
            raise exc

    ######################################################
dataset/ETHPy150Open dsiroky/snakemq/snakemq/rpc.py/RpcServer.send_exception/original