summaryrefslogtreecommitdiff
path: root/TAO/examples/CSD_Strategy/ThreadPool4/server_main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/examples/CSD_Strategy/ThreadPool4/server_main.cpp')
-rw-r--r--TAO/examples/CSD_Strategy/ThreadPool4/server_main.cpp33
1 files changed, 15 insertions, 18 deletions
diff --git a/TAO/examples/CSD_Strategy/ThreadPool4/server_main.cpp b/TAO/examples/CSD_Strategy/ThreadPool4/server_main.cpp
index d0884b4aeb4..ae4b26425fb 100644
--- a/TAO/examples/CSD_Strategy/ThreadPool4/server_main.cpp
+++ b/TAO/examples/CSD_Strategy/ThreadPool4/server_main.cpp
@@ -20,24 +20,21 @@ main(int argc, char* argv[])
ServerApp app;
- ACE_TRY_NEW_ENV
- {
- int ret = app.run(argc,argv ACE_ENV_ARG_PARAMETER);
- ACE_TRY_CHECK;
- return ret == 1 ? 0 : ret;
- }
- ACE_CATCHANY
- {
- ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
- "Caught exception:");
- }
- ACE_CATCHALL
- {
- ACE_ERROR((LM_ERROR,
- "(%P|%t) Unknown (...) exception caught in main() "
- "for ServerApp\n"));
- }
- ACE_ENDTRY;
+ try
+ {
+ int ret = app.run(argc,argv);
+ return ret == 1 ? 0 : ret;
+ }
+ catch (const CORBA::Exception& ex)
+ {
+ ex._tao_print_exception ("Caught exception:");
+ }
+ catch (...)
+ {
+ ACE_ERROR((LM_ERROR,
+ "(%P|%t) Unknown (...) exception caught in main() "
+ "for ServerApp\n"));
+ }
return 1;
}