diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-09-01 11:59:58 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-09-01 11:59:58 +0000 |
commit | db2e4d9a34542036e87e34f6fb7bb6ded9cf4273 (patch) | |
tree | d7edf18aac938393b6d529d3045a5ff67e0b2995 /fnet | |
parent | 33bbb5d4369c26eb73bdf3aac23382dbc2da75b1 (diff) |
Catch any std:exceptions from rpc_invoke.
Diffstat (limited to 'fnet')
-rw-r--r-- | fnet/src/examples/frt/rpc/rpc_invoke.cpp | 12 |
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(); |