From a0fd31e93e852775fe84167cd71ab46ed9e6189b Mon Sep 17 00:00:00 2001 From: huangjianhui <852142024@qq.com> Date: Tue, 23 Nov 2021 19:05:05 +0800 Subject: [PATCH] Update error_catch.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When Init error,Args is too much, remove temporarily --- python/pipeline/error_catch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/pipeline/error_catch.py b/python/pipeline/error_catch.py index fe2f2531..a8e6c0ea 100644 --- a/python/pipeline/error_catch.py +++ b/python/pipeline/error_catch.py @@ -84,7 +84,7 @@ class ErrorCatch(): except CustomException as e: log_id = self._id_generator.next() resp = pipeline_service_pb2.Response() - _LOGGER.error("\nLog_id: {}\n{}Classname: {}\nFunctionName:{}\nArgs:{}".format(log_id, traceback.format_exc(), func.__qualname__, func.__name__, args)) + _LOGGER.error("\nLog_id: {}\n{}Classname: {}\nFunctionName:{}\nArgs:{}".format(log_id, traceback.format_exc(), func.__qualname__, func.__name__)) split_list = re.split("\n|\t|:", str(e)) resp.err_no = int(split_list[3]) resp.err_msg = "Log_id: {} ErrNo: {} Error_msg: {} ClassName: {} FunctionName: {}".format(log_id, resp.err_no, split_list[9], func.__qualname__ ,func.__name__ ) @@ -98,7 +98,7 @@ class ErrorCatch(): except Exception as e: log_id = self._id_generator.next() resp = pipeline_service_pb2.Response() - _LOGGER.error("\nLog_id: {}\n{}Classname: {}\nFunctionName: {}\nArgs: {}".format(log_id, traceback.format_exc(), func.__qualname__, func.__name__, args)) + _LOGGER.error("\nLog_id: {}\n{}Classname: {}\nFunctionName: {}\nArgs: {}".format(log_id, traceback.format_exc(), func.__qualname__, func.__name__)) resp.err_no = CustomExceptionCode.UNKNOW.value resp.err_msg = "Log_id: {} ErrNo: {} Error_msg: {} ClassName: {} FunctionName: {}".format(log_id, resp.err_no, str(e).replace("\'", ""), func.__qualname__ ,func.__name__ ) return (None, resp) -- GitLab