From 8967e7f2f8b94dc032135707e16c8a9f233d0db6 Mon Sep 17 00:00:00 2001 From: lichao <lichao@aiotlink.com> Date: 星期四, 03 六月 2021 13:32:16 +0800 Subject: [PATCH] rafactor, remove old todo, add some err msg. --- src/topic_node.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/topic_node.cpp b/src/topic_node.cpp index f592bff..5362318 100644 --- a/src/topic_node.cpp +++ b/src/topic_node.cpp @@ -569,7 +569,8 @@ reply_head.mutable_proc_id()->swap(out_proc_id); return true; } - } catch (...) { + } catch (std::exception &e) { + LOG_ERROR() << __func__ << " exception: " << e.what(); SetLastError(eError, __func__ + std::string(" internal errer.")); } return false; @@ -672,7 +673,6 @@ reply.ParseBody(reply_body) && IsSuccess(reply_body.errmsg().errcode()); } - // TODO wait for result? } catch (...) { return false; } @@ -718,12 +718,12 @@ return false; } } - //TODO error msg. if (head.type() == kMsgTypePublish) { if (pub.ParseFromString(body)) { head.mutable_proc_id()->swap(proc_id); return true; } } + SetLastError(eError, "invalid subcribe msg received."); return false; } \ No newline at end of file -- Gitblit v1.8.0