From 60f51d6688e98ed87d24e6e9d1f179ca5db8f07a Mon Sep 17 00:00:00 2001 From: Marc Laukien Date: Mon, 17 Sep 2001 22:04:17 +0000 Subject: tons of fixes --- cpp/demo/Ice/hello/Client.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'cpp/demo/Ice/hello/Client.cpp') diff --git a/cpp/demo/Ice/hello/Client.cpp b/cpp/demo/Ice/hello/Client.cpp index ecc5680cd77..f02cc612d48 100644 --- a/cpp/demo/Ice/hello/Client.cpp +++ b/cpp/demo/Ice/hello/Client.cpp @@ -35,9 +35,15 @@ int run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator) { Ice::PropertiesPtr properties = communicator->getProperties(); - std::string ref = properties->getProperty("Hello.Hello"); - Ice::ObjectPrx base = communicator->stringToProxy(ref); + const char* refProperty = "Hello.Hello"; + std::string ref = properties->getProperty(refProperty); + if (ref.empty()) + { + cerr << argv[0] << ": property `" << refProperty << "' not set" << endl; + return EXIT_FAILURE; + } + Ice::ObjectPrx base = communicator->stringToProxy(ref); HelloPrx twoway = HelloPrx::checkedCast(base); if (!twoway) { -- cgit v1.2.3