Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / TAO / tests / CSD_Strategy_Tests / TP_Common / TestAppMain.h
bloba5e083223813a02f6f013f02bff8c944b45629bc
1 #ifndef TESTAPPMAIN_H
2 #define TESTAPPMAIN_H
4 #include "ace/Log_Msg.h"
5 #include "ace/SString.h"
6 #include "tao/Exception.h"
7 #include "tao/Environment.h"
9 #define TEST_APP_MAIN(APP_TYPE) \
10 int \
11 ACE_TMAIN(int argc, ACE_TCHAR *argv[])\
12 { \
13 ACE_LOG_MSG->priority_mask(LM_TRACE | \
14 LM_DEBUG | \
15 LM_INFO | \
16 LM_NOTICE | \
17 LM_WARNING | \
18 LM_ERROR | \
19 LM_CRITICAL | \
20 LM_ALERT | \
21 LM_EMERGENCY, \
22 ACE_Log_Msg::PROCESS); \
24 APP_TYPE app; \
26 try\
27 { \
28 int ret = app.run(argc,argv); \
30 return ret; \
31 } \
32 catch (const CORBA::Exception& ex)\
33 { \
34 ex._tao_print_exception ("Caught exception:"); \
35 } \
36 catch (...)\
37 { \
38 ACE_ERROR((LM_ERROR, \
39 "(%P|%t) Unknown (...) exception caught in main() " \
40 "for App [%d].\n", app.name())); \
41 } \
43 return 1; \
46 #endif