summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-05 21:41:25 +0000
committernanbor <nanbor@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-05 21:41:25 +0000
commitd00fc0c81d6bbb9831ded4990f889d9bbb799eea (patch)
treec1c6d8ae7c41495ddc86cc4d1abe8472668c1746
parentbd0770c30a0a25afd611e71e5e569e30d86aaf41 (diff)
downloadATCD-d00fc0c81d6bbb9831ded4990f889d9bbb799eea.tar.gz
Removed duplicate macros defined in try_macros.h
-rw-r--r--TAO/tao/corba.h156
1 files changed, 0 insertions, 156 deletions
diff --git a/TAO/tao/corba.h b/TAO/tao/corba.h
index 1479625d0ec..1a804a4ca1c 100644
--- a/TAO/tao/corba.h
+++ b/TAO/tao/corba.h
@@ -252,162 +252,6 @@ extern TAO_Export int operator== (const TAO_ObjectKey &l,
#endif /* ACE_WIN32 */
#endif /* ACE_NESTED_CLASS */
-//
-// These macros can be used to write "portable" code between platforms
-// supporting CORBA exceptions natively (using the C++ exceptions) or
-// through the Enviroment parameter.
-// Their use requires some discipline, but they certainly help...
-//
-#if defined (TAO_USE_EXCEPTIONS)
-
-#define TAO_TRY_ENV __env
-// The first "do" scope is for the env.
-// The second "do" scope is for the TAO_CHECK_ENV continues.
-#define TAO_TRY \
-CORBA_Environment TAO_TRY_ENV; \
-try {
-#define TAO_CATCH(TYPE,VAR) \
-} catch (TYPE & VAR) {
-#define TAO_CATCHANY \
-} catch (...) {
-#define TAO_ENDTRY }
-
-// No need to do checking, exception handling does it for us.
-#define TAO_CHECK_ENV
-#define TAO_CHECK_ENV_RETURN(X, Y)
-
-#define TAO_THROW(EXCEPTION) throw EXCEPTION
-#define TAO_THROW_RETURN(EXCEPTION, RETURN) throw EXCEPTION
-#define TAO_RETHROW throw
-#define TAO_RETHROW_RETURN(RETURN) throw
-
-// #define TAO_THROW_SPEC(X) ACE_THROW_SPEC(X)
-#define TAO_THROW_SPEC(X)
-// The IDL compiler is not generating throw specs, so putting them in
-// the servant implementation only results in compilation
-// errors. Further the spec does not say that we should generate them
-// and I'm concerned that putting a throw spec can result in an
-// "unexpected" exception, which *could* be translated into a
-// CORBA::UNKNOWN, but I'm not sure.
-
-#define TAO_RAISE(EXCEPTION) throw EXCEPTION
-// This is used in the implementation of the _raise methods
-
-#else /* ACE_HAS_EXCEPTIONS && TAO_IDL_COMPILES_HAS_EXCEPTIONS */
-
-// Define a local enviroment variable...
-#define TAO_TRY_ENV __env
-
-// I would like to experiment with this idea in the future....
-#if 0
-#define TAO_TRY_VAR(X) \
-do { CORBA_Environment &_env = CORBA_Environment::default_environment ()= X; \
-int TAO_TRY_FLAG = 1; \
-TAO_TRY_LABEL: \
-if (TAO_TRY_FLAG) \
-do {
-#endif /* 0 */
-
-// The first "do" scope is for the env.
-// The second "do" scope is for the TAO_CHECK_ENV continues.
-#define TAO_TRY \
-do { CORBA_Environment TAO_TRY_ENV; \
-int TAO_TRY_FLAG = 1; \
-TAO_TRY_LABEL: \
-if (TAO_TRY_FLAG) \
-do {
-
-// Each CATCH statement ends the previous scope and starts a new one.
-// Since all CATCH statements can end the TAO_TRY macro, they must all
-// start a new scope for the next potential TAO_CATCH. The TAO_ENDTRY
-// will finish them all. Cool, eh?
-#define TAO_CATCH(TYPE,VAR) \
-} while (0); \
-do \
-if (TAO_TRY_ENV.exception () != 0 && \
- TYPE::_narrow(TAO_TRY_ENV.exception ()) != 0) { \
- TYPE &VAR = *TYPE::_narrow (TAO_TRY_ENV.exception ()); \
- ACE_UNUSED_ARG (VAR);
-
-#define TAO_CATCHANY \
-} while (0); \
-do { \
-if (TAO_TRY_ENV.exception () != 0)
-
-// The first "while" closes the local scope. The second "while"
-// closes the TAO_TRY_ENV scope.
-#define TAO_ENDTRY \
-} while (0); \
-} while (0)
-
-// If continue is called, control will skip to the next TAO_CATCHANY
-// statement.
-#define TAO_CHECK_ENV \
-{\
-if (TAO_TRY_ENV.exception () != 0) \
- { \
- TAO_TRY_FLAG = 0; \
- goto TAO_TRY_LABEL; \
- } \
-}
-
-#define TAO_CHECK_ENV_RETURN(X, Y) \
- if ( X . exception () != 0) return Y
-
-#define TAO_THROW(EXCEPTION) \
-do {\
- _env.exception (new EXCEPTION); \
- return; } while (0)
-
-#define TAO_THROW_ENV(EXCEPTION, ENV) \
-do {\
- ENV.exception (new EXCEPTION); \
- return; } while (0)
-
-#define TAO_THROW_RETURN(EXCEPTION, RETURN) \
-do {\
- _env.exception (new EXCEPTION); \
- return RETURN; } while (0)
-
-#define TAO_THROW_ENV_RETURN(EXCEPTION, ENV, RETURN) \
-do {\
- ENV.exception (new EXCEPTION); \
- return RETURN; } while (0)
-
-#define TAO_RETHROW \
-_env.exception (TAO_TRY_ENV.exception ()); \
-return
-
-#define TAO_RETHROW_RETURN(RETURN) \
-_env.exception (TAO_TRY_ENV.exception ()); \
-return RETURN
-
-#define TAO_THROW_SPEC(X)
-
-#define TAO_RAISE(EXCEPTION)
-
-#endif /* ACE_HAS_EXCEPTIONS */
-
-#define TAO_CHECK_ENV_RETURN_VOID(X) \
- if ( X . exception () != 0) return
-
-#define TAO_CHECK_ENV_PRINT_RETURN(ENV, PRINT_STRING, RETURN) \
- if (ENV . exception () != 0) \
- { \
- ENV.print_exception (PRINT_STRING); \
- return RETURN; \
- }
-
-#define TAO_CHECK_ENV_PRINT_RETURN_VOID(ENV, PRINT_STRING) \
- if (ENV . exception () != 0) \
- { \
- ENV.print_exception (PRINT_STRING); \
- return; \
- }
-
-// This is here temporary, until Carlos will add the macro.
-# define TAO_TRY_THROW(EXCEPTION) TAO_THROW(EXCEPTION)
-
#endif /* TAO_MASTER_CORBA_H */