Merge pull request #2303 from jwillemsen/jwi-803
[ACE_TAO.git] / TAO / examples / Simple / chat / server.cpp
blob1581f3debbc68564cab47134ea153378faff7d78
2 //=============================================================================
3 /**
4 * @file server.cpp
6 * Entry point for the chat server.
8 * @author Pradeep Gore <pradeep@cs.wustl.edu>
9 */
10 //=============================================================================
13 #include "Server_i.h"
15 int
16 ACE_TMAIN(int argc, ACE_TCHAR *argv[])
18 try
20 Server_i server_i;
22 int ret = server_i.init (argc, argv);
23 if (ret != 0)
24 ACE_ERROR_RETURN ((LM_ERROR,
25 ACE_TEXT ("\n error in init.\n")),
26 1);
27 ret = server_i.run ();
28 if (ret != 0)
29 ACE_ERROR_RETURN ((LM_ERROR,
30 ACE_TEXT ("\n error in run.\n")),
31 1);
33 catch (const CORBA::Exception& ex)
35 ex._tao_print_exception ("server::main\t\n");
36 return 1;
39 return 0;