============ Clean up for native exception mode support ====== General description To support both native/emulated exception in the same source code, we have to carefully use ACE_TRY/ACE_MACROs. Also noticed that we have to change the option "-Ge 1" to the IDL compiler to generate stubs to support both native/emulation in one stubs. of IDL (new) 2k/AutoConfig/AutoConfigExceptions.idl (obsolete) 2k/AutoConfig/BaseException.cpp (obsolete) 2k/AutoConfig/BaseException.h (obsolete) 2k/AutoConfig/AutoConfigExceptions.cpp (obsolete) 2k/AutoConfig/AutoConfigExceptions.h * ACE_TRY/ACE_CATCH macro can only handle CORBA::Exception derived exceptions. So All the exception should be CORBA exception even though exceptions are not sent through the IDL interface if you would like to support native and emulated exceptions. CORBA::Exception uses _narrow() to determine exception type. IDL does not support inheritance of exception so we cannot 100% emulation of C++ exception here though. 2k/AutoConfig/Makefile * Change TAO_IDLFLAGS * new rules for AutoConfigExceptions.idl * make depend 2k/AutoConfig/AutoConfig_i.h 2k/AutoConfig/AutoConfig_i.cpp 2k/AutoConfig/PrereqParser.h 2k/AutoConfig/PrereqParser.cpp 2k/AutoConfig/PrereqResolver.h 2k/AutoConfig/SimpleResolver.h 2k/AutoConfig/SimpleResolver.cpp 2k/AutoConfig/SPDFParser.h 2k/AutoConfig/SPDFParser.cpp * Modify function interface to conform both exception=0 and exception=1 with ACE_THROW_SPEC and ACE_THROW macros * Name change ACE_CAUGHT_ENV.print_exception() ==> ACE_ANY_EXCEPTION._tao_print_exception() * AutoConfig_i::load_component() Add ACE_CHECK macro to return exception Since BaseException is not derived from CORBA::Exception So we couldn't use ACE_TRY macros. We replaced it with exceptions defined in AutoConfigExceptions.idl * Rewrite native exception with ACE_TRY/ACE_CATCH macros func() throw(x) => func() ACE_THROW_SPEC((x)) throw x => ACE_THROW(x) * Add CORBA::Environment &ACE_TRY_ENV to the arguments if the function throw exception. It is for supporting "emulated exception" environment. * ACE_TRY_ENV_NEW => ACE_TRY_ENV * (Old) #include "AutoConfifExceptions.h" (new) #include "AutoConfigExceptionsC.h" 2k/AutoConfig/client_i.cpp * Name change ACE_CAUGHT_ENV.print_exception() ==> ACE_ANY_EXCEPTION._tao_print_exception() 2k/ComponentConfigurator/Configuration_i.cpp 2k/ComponentConfigurator/Configuration_i.h * Rewrite interface with ACE_THROW_SPEC and ACE_THROW macro 2k/ComponentConfigurator/Makefile * Change TAO_IDLFLAGS 2k/Environment/Makefile * Change TAO_IDLFLAGS 2k/tests/hello/dynamicTAO/Makefile * ADD TAO_IDLFLAGS 2k/tests/hello/client_i.cpp * Name change ACE_CAUGHT_ENV.print_exception() ==> ACE_ANY_EXCEPTION._tao_print_exception() 2k/tests/hello/server.cpp * Name change ACE_CAUGHT_ENV.print_exception() ==> ACE_ANY_EXCEPTION._tao_print_exception() dynamicTAO/src/Components/Simple_Component_Factory.cpp * Name change ACE_CAUGHT_ENV.print_exception() ==> ACE_ANY_EXCEPTION._tao_print_exception() dynamicTAO/src/DynamicConfigurator/Makefile * ADD TAO_IDLFLAGS dynamicTAO/src/DynamicConfigurator/dynamicConfigurator_i_.* * Rewrite interface with ACE_ThROW_SPEC and ACE_THROW macro dynamicTAO/src/Monitoring_Service/HelloWorld/Makefile * ADD TAO_IDLFLAGS dynamicTAO/src/Monitoring_Service/InforStorage/Makefile * ADD TAO_IDLFLAGS dynamicTAO/src/StrategyFactories/PerformanceMonitor/Makefile * Rewrite idl compilation process dynamicTAO/src/StrategyFactories/PerformanceMonitor/Monitoring_Strategy.cpp * end_point() call Storafe_->add_multiple_entries() argument error