summaryrefslogtreecommitdiff
path: root/cpp/demo/Ice/value/Client.cpp
diff options
context:
space:
mode:
authorMichi Henning <michi@zeroc.com>2005-05-19 01:47:35 +0000
committerMichi Henning <michi@zeroc.com>2005-05-19 01:47:35 +0000
commitc672443296deee643ff325b23738f413b557488d (patch)
tree69649b23f0ce78188b4d250a095161ebbcfc8973 /cpp/demo/Ice/value/Client.cpp
parentFixed http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=324. (diff)
downloadice-c672443296deee643ff325b23738f413b557488d.tar.bz2
ice-c672443296deee643ff325b23738f413b557488d.tar.xz
ice-c672443296deee643ff325b23738f413b557488d.zip
Fixed http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=324
Diffstat (limited to 'cpp/demo/Ice/value/Client.cpp')
-rw-r--r--cpp/demo/Ice/value/Client.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/cpp/demo/Ice/value/Client.cpp b/cpp/demo/Ice/value/Client.cpp
index e991c89d643..1ec3920d9d1 100644
--- a/cpp/demo/Ice/value/Client.cpp
+++ b/cpp/demo/Ice/value/Client.cpp
@@ -66,17 +66,16 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
PrinterPtr printer;
PrinterPrx printerProxy;
- bool gotException = false;
try
{
initial->getPrinter(printer, printerProxy);
+ cerr << argv[0] << "Did not get the expected NoObjectFactoryException!" << endl;
+ exit(EXIT_FAILURE);
}
catch(const Ice::NoObjectFactoryException& ex)
{
cout << "==> " << ex << endl;
- gotException = true;
}
- assert(gotException);
cout << '\n'
<< "Yep, that's what we expected. Now let's try again, but with\n"
@@ -154,18 +153,21 @@ run(int argc, char* argv[], const Ice::CommunicatorPtr& communicator)
<< "[press enter]\n";
cin.getline(c, 2);
- gotException = false;
try
{
initial->throwDerivedPrinter();
+ cerr << argv[0] << "Did not get the expected DerivedPrinterException!" << endl;
+ exit(EXIT_FAILURE);
}
catch(const DerivedPrinterException& ex)
{
derived = ex.derived;
- assert(derived);
- gotException = true;
+ if(!derived)
+ {
+ cerr << argv[0] << "Unexpected null pointer for `derived'" << endl;
+ exit(EXIT_FAILURE);
+ }
}
- assert(gotException);
cout << "==> " << derived->derivedMessage << endl;
cout << "==> ";