From: Hwankyu Jhun Date: Fri, 19 Aug 2022 00:17:13 +0000 (+0000) Subject: Add a missing exception handling X-Git-Tag: submit/tizen/20220819.013532~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a53752c419c8e20e0f28420a71af3c5e0638e042;p=platform%2Fcore%2Fappfw%2Frpc-port.git Add a missing exception handling The SetReceiveTimeout() method throws an exception when the error occurs. Change-Id: I8ea11f4d7e04a127efebe4c516a1fbe32bf6a435 Signed-off-by: Hwankyu Jhun --- diff --git a/src/proxy-internal.cc b/src/proxy-internal.cc index 2eb538b..bd03cac 100644 --- a/src/proxy-internal.cc +++ b/src/proxy-internal.cc @@ -611,7 +611,7 @@ Proxy::Client* Proxy::Client::Create(Proxy* parent, std::unique_ptr client; try { client.reset(new (std::nothrow) Proxy::Client(parent)); - } catch (Exception& e) { + } catch (const Exception& e) { _E("Exception(%s) occurs", e.what()); return nullptr; } @@ -634,7 +634,13 @@ Proxy::Client* Proxy::Client::Create(Proxy* parent, return nullptr; } - client->SetReceiveTimeout(5000); + try { + client->SetReceiveTimeout(5000); + } catch (const Exception& e) { + _E("Exception occurs. error(%s)", e.what()); + return nullptr; + } + _W("endpoint(%s), fd(%d)", endpoint.c_str(), client->GetFd()); return client.release(); }