diff options
author | Jose <jose@zeroc.com> | 2015-12-16 16:57:29 +0100 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2015-12-16 16:57:29 +0100 |
commit | d2d004c41cad5024cbffb7b3c312132b1c545b40 (patch) | |
tree | 6f617f5a12bec6a419d6ce248bb9e5002d23702a /cpp/test/Ice/slicing/exceptions/Client.cpp | |
parent | PHP IceGridLib fixes (diff) | |
download | ice-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.cpp | 28 |
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; } |