return;
}
- stub_.Listen(std::shared_ptr<
- bs::Benchmark::ServiceBase::Factory>(
- new TestService::Factory()));
+ try {
+ stub_.Listen(std::shared_ptr<bs::Benchmark::ServiceBase::Factory>(
+ new TestService::Factory()));
+ } catch (const std::exception& e) {
+ _E("stub listen is failed(%s)", e.what());
+ }
g_main_loop_run(loop_);
}
namespace {
-constexpr const char SERVER_PROC_NAME[] = "org.tizen.appfw.rpc_port.benchmark";
-constexpr const char SERVER_BIN[] = "/usr/bin/rpc-port-benchmark-server";
+#define SERVER_PROC_NAME "org.tizen.appfw.rpc_port.benchmark"
+#define SERVER_BIN "/usr/bin/rpc-port-benchmark-server"
namespace bp = rpc_port::BenchmarkProxy::proxy;
if (server_pid_ == 0) {
setsid();
- char* argv[] = { strdup(SERVER_BIN), nullptr, nullptr };
+ char* argv[] = { SERVER_BIN, nullptr, nullptr };
int ret = execv(argv[0], argv);
if (ret < 0) {
std::cerr << "execv() is failed. errno: " << errno << std::endl;
int main(int argc, char** argv) {
Tester tester;
- tester.Run(argc, argv);
+ try {
+ tester.Run(argc, argv);
+ } catch (const std::exception& e) {
+ std::cerr << "Exception occurred!!!" << e.what() << std::endl;
+ }
+
return 0;
}