summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fnet/src/examples/frt/rpc/rpc_invoke.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/fnet/src/examples/frt/rpc/rpc_invoke.cpp b/fnet/src/examples/frt/rpc/rpc_invoke.cpp
index 471fd9a879f..d7dc6b86b77 100644
--- a/fnet/src/examples/frt/rpc/rpc_invoke.cpp
+++ b/fnet/src/examples/frt/rpc/rpc_invoke.cpp
@@ -40,6 +40,7 @@ private:
}
return true;
}
+ int run();
public:
virtual int Main();
@@ -55,6 +56,17 @@ RPCClient::Main()
fprintf(stderr, " supported types: {'b','h','i','l','f','d','s'}\n");
return 1;
}
+ try {
+ return run();
+ } catch (const std::exception & e) {
+ fprintf(stderr, "Caught exception : '%s'", e.what());
+ return 2;
+ }
+}
+
+int
+RPCClient::run()
+{
int retCode = 0;
FRT_Supervisor supervisor;
supervisor.Start();