diff options
author | Matthew Newhook <matthew@zeroc.com> | 2001-11-27 14:24:58 +0000 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2001-11-27 14:24:58 +0000 |
commit | ed26a91d70fb1dece4208e013f67a7a2da84d748 (patch) | |
tree | ca04992186bb24b55866bc5e54d3bc112d9100ea /cpp/demo/IceStorm/clock/Publisher.cpp | |
parent | Updated the SSL Connections to perform proper network tracing against (diff) | |
download | ice-ed26a91d70fb1dece4208e013f67a7a2da84d748.tar.bz2 ice-ed26a91d70fb1dece4208e013f67a7a2da84d748.tar.xz ice-ed26a91d70fb1dece4208e013f67a7a2da84d748.zip |
Update config file. Add README file. Small demo changes. Remove config file
from IceStorm src dir.
Diffstat (limited to 'cpp/demo/IceStorm/clock/Publisher.cpp')
-rw-r--r-- | cpp/demo/IceStorm/clock/Publisher.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cpp/demo/IceStorm/clock/Publisher.cpp b/cpp/demo/IceStorm/clock/Publisher.cpp index a148a85e94a..8686d797834 100644 --- a/cpp/demo/IceStorm/clock/Publisher.cpp +++ b/cpp/demo/IceStorm/clock/Publisher.cpp @@ -35,12 +35,18 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) return EXIT_FAILURE; } - IceStorm::TopicPrx topic = manager->retrieve("time"); - if (!topic) + IceStorm::TopicPrx topic; + try + { + topic = manager->retrieve("time"); + } + catch(const IceStorm::NoSuchTopic& e) { - cerr << argv[0] << ": No topic `time'" << endl; + cerr << argv[0] << ": NoSuchTopic: " << e.name << endl; return EXIT_FAILURE; + } + assert(topic); // // Get a publisher object, create a oneway proxy and then cast to |