OSC3.py 文件源码

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

项目:pyOSC3 作者: Qirky 项目源码 文件源码
def handle_error(self, request, client_address):
        """Handle an exception in the Server's callbacks gracefully.
        Writes the error to sys.stderr and, if the error_prefix (see setSrvErrorPrefix()) is set,
        sends the error-message as reply to the client
        """
        (e_type, e) = sys.exc_info()[:2]
        self.printErr("%s on request from %s: %s" % (e_type.__name__, getUrlStr(client_address), str(e)))

        if self.print_tracebacks:
            import traceback
            traceback.print_exc() # XXX But this goes to stderr!

        if len(self.error_prefix):
            self.sendOSCerror("%s: %s" % (e_type.__name__, str(e)), client_address)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号