Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / examples / Simple / grid / server.cpp
blob7069e3acc741fc56d4d2176073686f19c5e1a0aa
1 #include "../Simple_util.h"
2 #include "Grid_i.h"
4 // This is the main driver program for the time and date server.
6 int
7 ACE_TMAIN(int argc, ACE_TCHAR *argv[])
9 Server<Grid_Factory_i> server;
11 ACE_DEBUG ((LM_DEBUG,
12 ACE_TEXT ("\n\tGrid server\n\n")));
14 try
16 if (server.init ("Grid",
17 argc,
18 argv) == -1)
19 return 1;
20 else
22 server.run ();
25 catch (const CORBA::UserException& userex)
27 //ACE_UNUSED_ARG (userex);
28 userex._tao_print_exception ("User Exception in main");
29 return -1;
31 catch (const CORBA::SystemException& sysex)
33 //ACE_UNUSED_ARG (sysex);
34 sysex._tao_print_exception ("System Exception in main ");
35 return -1;
37 catch (const ::CORBA::Exception &e)
39 e._tao_print_exception ("CORBA exception in main");
40 return 1;
43 return 0;