Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / performance-tests / CSD_Strategy / TestInf / TestAppMain.h
blobf6adba43d5bd90b0198b8e59e6290f5bcea068b6
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