diff options
Diffstat (limited to 'ACE/TAO/examples/CSD_Strategy/ThreadPool6/server_main.cpp')
-rw-r--r-- | ACE/TAO/examples/CSD_Strategy/ThreadPool6/server_main.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/ACE/TAO/examples/CSD_Strategy/ThreadPool6/server_main.cpp b/ACE/TAO/examples/CSD_Strategy/ThreadPool6/server_main.cpp new file mode 100644 index 00000000000..5af35beb0fc --- /dev/null +++ b/ACE/TAO/examples/CSD_Strategy/ThreadPool6/server_main.cpp @@ -0,0 +1,42 @@ +// $Id$ +#include "ServerApp.h" +#include "ace/Log_Msg.h" +#include "ace/CORBA_macros.h" +#include "tao/Environment.h" +#include "tao/Exception.h" + + +int +ACE_TMAIN(int argc, ACE_TCHAR *argv[]) +{ + ACE_LOG_MSG->priority_mask(LM_TRACE | + LM_DEBUG | + LM_INFO | + LM_NOTICE | + LM_WARNING | + LM_ERROR | + LM_CRITICAL | + LM_ALERT | + LM_EMERGENCY, + ACE_Log_Msg::PROCESS); + + ServerApp app; + + 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; +} |