From: Hwankyu Jhun Date: Mon, 18 Sep 2023 22:37:38 +0000 (+0900) Subject: Add exception handlings X-Git-Tag: accepted/tizen/8.0/unified/20231005.093101~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=88526f9528c0bedc2a77cbf2ded3df71c8f9e5e7;p=platform%2Fcore%2Fappfw%2Frpc-port.git Add exception handlings The generated code can throw InvalidIOException and std::bad_weak_ptr exceptions. This patch adds exception handlings. Change-Id: I91e4d1fecab9e4e9a2047efe47f4616a396b9b00 Signed-off-by: Hwankyu Jhun --- diff --git a/benchmark/tool/main.cc b/benchmark/tool/main.cc index 8abe412..1fae0e2 100644 --- a/benchmark/tool/main.cc +++ b/benchmark/tool/main.cc @@ -183,7 +183,16 @@ class Tester { } // namespace int main(int argc, char** argv) { - Tester tester; - tester.Run(argc, argv); + try { + Tester tester; + tester.Run(argc, argv); + } catch (const rpc_port::BenchmarkProxy::proxy::InvalidIOException& ie) { + _E("InvalidIOException occurs"); + return -1; + } catch (const std::bad_weak_ptr& be) { + _E("bad_weak_ptr occurs. error(%s)", be.what()); + return -1; + } + return 0; }