summaryrefslogtreecommitdiff
path: root/cpp/test/Ice/slicing/exceptions/Client.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-12-16 16:57:29 +0100
committerJose <jose@zeroc.com>2015-12-16 16:57:29 +0100
commitd2d004c41cad5024cbffb7b3c312132b1c545b40 (patch)
tree6f617f5a12bec6a419d6ce248bb9e5002d23702a /cpp/test/Ice/slicing/exceptions/Client.cpp
parentPHP IceGridLib fixes (diff)
downloadice-d2d004c41cad5024cbffb7b3c312132b1c545b40.tar.bz2
ice-d2d004c41cad5024cbffb7b3c312132b1c545b40.tar.xz
ice-d2d004c41cad5024cbffb7b3c312132b1c545b40.zip
c++11 slicing/exceptions test updates
Diffstat (limited to 'cpp/test/Ice/slicing/exceptions/Client.cpp')
-rw-r--r--cpp/test/Ice/slicing/exceptions/Client.cpp28
1 files changed, 5 insertions, 23 deletions
diff --git a/cpp/test/Ice/slicing/exceptions/Client.cpp b/cpp/test/Ice/slicing/exceptions/Client.cpp
index d9667684990..2af061d744f 100644
--- a/cpp/test/Ice/slicing/exceptions/Client.cpp
+++ b/cpp/test/Ice/slicing/exceptions/Client.cpp
@@ -19,8 +19,8 @@ DEFINE_TEST("client")
int
run(int, char**, const Ice::CommunicatorPtr& communicator)
{
- TestIntfPrx allTests(const Ice::CommunicatorPtr&);
- TestIntfPrx Test = allTests(communicator);
+ TestIntfPrxPtr allTests(const Ice::CommunicatorPtr&);
+ TestIntfPrxPtr Test = allTests(communicator);
Test->shutdown();
return EXIT_SUCCESS;
}
@@ -32,32 +32,14 @@ main(int argc, char* argv[])
Ice::registerIceSSL();
#endif
- int status;
- Ice::CommunicatorPtr communicator;
-
try
{
- communicator = Ice::initialize(argc, argv);
- status = run(argc, argv, communicator);
+ Ice::CommunicatorHolder ich = Ice::initialize(argc, argv);
+ return run(argc, argv, ich.communicator());
}
catch(const Ice::Exception& ex)
{
cerr << ex << endl;
- status = EXIT_FAILURE;
+ return EXIT_FAILURE;
}
-
- if(communicator)
- {
- try
- {
- communicator->destroy();
- }
- catch(const Ice::Exception& ex)
- {
- cerr << ex << endl;
- status = EXIT_FAILURE;
- }
- }
-
- return status;
}