Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# CORBA_macros.h File Reference

`#include "ace/pre.h"`
`#include "ace/OS.h"`
`#include "ace/post.h"`

Include dependency graph for CORBA_macros.h:

## Defines
#define | ACE_TRY_ENV _ACE_CORBA_Environment_variable
#define | ACE_ANY_EXCEPTION ex
#define | ACE_CORBA_HAS_EXCEPTIONS
#define | ACE_DECLARE_NEW_CORBA_ENV
#define | ACE_ADOPT_CORBA_ENV(ENV) ACE_UNUSED_ARG(ENV)
#define | ACE_CHECK
#define | ACE_CHECK_RETURN(RETV)
#define | ACE_THROW_INT(EXCEPTION)
#define | ACE_THROW(EXCEPTION)
#define | ACE_THROW_RETURN(EXCEPTION,RETV)
#define | ACE_TRY
#define | ACE_TRY_NEW_ENV
#define | ACE_TRY_EX(LABEL)
#define | ACE_TRY_CHECK
#define | ACE_TRY_CHECK_EX(LABEL)
#define | ACE_TRY_THROW(EXCEPTION) throw EXCEPTION
#define | ACE_TRY_THROW_EX(EXCEPTION,LABEL) throw EXCEPTION
#define | ACE_CATCH(EXCEPTION,VAR)
#define | ACE_CATCHANY
#define | ACE_CATCHALL
#define | ACE_RE_THROW throw
#define | ACE_RE_THROW_EX(LABEL) throw
#define | ACE_ENDTRY
#define | ACE_NEW_THROW_EX(POINTER,CONSTRUCTOR,EXCEPTION)
#define | ACE_NEW_THROW(POINTER,CONSTRUCTOR,EXCEPTION)
#define | ACE_NEW_THROW_RETURN(POINTER,CONSTRUCTOR,EXCEPTION,RET_VAL)
#define | ACE_NEW_TRY_THROW(POINTER,CONSTRUCTOR,EXCEPTION)
#define | ACE_GUARD_THROW_EX(MUTEX,OBJ,LOCK,EXCEPTION)
#define | ACE_READ_GUARD_THROW_EX(MUTEX,OBJ,LOCK,EXCEPTION)
#define | ACE_WRITE_GUARD_THROW_EX(MUTEX,OBJ,LOCK,EXCEPTION)
#define | ACE_GUARD_THROW(MUTEX,OBJ,LOCK,EXCEPTION)
#define | ACE_GUARD_THROW_RETURN(MUTEX,OBJ,LOCK,EXCEPTION,RETURN)
#define | ACE_PRINT_TAO_EXCEPTION(EX,INFO)
#define | ACE_PRINT_EXCEPTION(EX,INFO) ACE_PRINT_TAO_EXCEPTION(EX,INFO)

## Detailed Description

Writing code that is portable between platforms with or without native C++ exceptions is hard. The following macros offer some help on this task, mostly oriented to making the ORB code and the IDL generated code portable.

Author(s):
  Nanbor Wang <nanbor@cs.wustl.edu> , Based on the original <tao/try_macros.h> implementation by , Aniruddha Gokhale <gokhale@sahyadri.research.bell-labs.com> , Carlos O'Ryan <coryan@cs.wustl.edu>, et al.

## Define Documentation

#define ACE_ADOPT_CORBA_ENV( | ENV ) ACE_UNUSED_ARG(ENV)

#define ACE_ANY_EXCEPTION ex

#define ACE_CATCH( | EXCEPTION, VAR )

| Initializer:
    \
             } \
           catch (EXCEPTION & VAR) \
             { \
               ACE_UNUSED_ARG (VAR);

#define ACE_CATCHALL

| Initializer:
    \
             } \
           catch (...) \
             {

#define ACE_CATCHANY

| Initializer:
    \
           ACE_CATCH(CORBA::Exception, ACE_ANY_EXCEPTION)

#define ACE_CHECK

#define ACE_CHECK_RETURN( | RETV )

#define ACE_CORBA_HAS_EXCEPTIONS

#define ACE_DECLARE_NEW_CORBA_ENV

| Initializer:
    \
      CORBA::Environment ACE_TRY_ENV

#define ACE_ENDTRY

| Initializer:
    \
             } \
         } while (0)

#define ACE_GUARD_THROW( | MUTEX, OBJ, LOCK, EXCEPTION )

| Initializer:
    \
      ACE_Guard< MUTEX > OBJ (LOCK); \
        if (OBJ.locked () == 0) TAO_THROW (EXCEPTION);

#define ACE_GUARD_THROW_EX( | MUTEX, OBJ, LOCK, EXCEPTION )

| Initializer:
    \
      ACE_Guard< MUTEX > OBJ (LOCK); \
        if (OBJ.locked () == 0) ACE_THROW_INT (EXCEPTION);

#define ACE_GUARD_THROW_RETURN( | MUTEX, OBJ, LOCK, EXCEPTION, RETURN )

| Initializer:
    \
      ACE_Guard< MUTEX > OBJ (LOCK); \
        if (OBJ.locked () == 0) TAO_THROW_RETURN (EXCEPTION, RETURN);

#define ACE_NEW_THROW( | POINTER, CONSTRUCTOR, EXCEPTION )

| Initializer:
    \
         do { POINTER = new CONSTRUCTOR; \
           if (POINTER == 0) { errno = ENOMEM; TAO_THROW (EXCEPTION); } \
         } while (0)

#define ACE_NEW_THROW_EX( | POINTER, CONSTRUCTOR, EXCEPTION )

| Initializer:
    \
         do { POINTER = new CONSTRUCTOR; \
           if (POINTER == 0) { errno = ENOMEM; ACE_THROW_INT (EXCEPTION); } \
         } while (0)

#define ACE_NEW_THROW_RETURN( | POINTER, CONSTRUCTOR, EXCEPTION, RET_VAL )

| Initializer:
    \
         do { POINTER = new CONSTRUCTOR; \
            if (POINTER == 0)\
            { errno = ENOMEM; TAO_THROW_RETURN (EXCEPTION,RET_VAL); } \
         } while (0)

#define ACE_NEW_TRY_THROW( | POINTER, CONSTRUCTOR, EXCEPTION )

| Initializer:
    \
         do { POINTER = new CONSTRUCTOR; \
           if (POINTER == 0) { errno = ENOMEM; TAO_TRY_THROW (EXCEPTION); } \
         } while (0)

#define ACE_PRINT_EXCEPTION( | EX, INFO ) ACE_PRINT_TAO_EXCEPTION(EX,INFO)

#define ACE_PRINT_TAO_EXCEPTION( | EX, INFO )

| Initializer:
    \
      EX._tao_print_exception (INFO)

#define ACE_READ_GUARD_THROW_EX( | MUTEX, OBJ, LOCK, EXCEPTION )

| Initializer:
    \
      ACE_Read_Guard< MUTEX > OBJ (LOCK); \
        if (OBJ.locked () == 0) ACE_THROW_INT (EXCEPTION);

#define ACE_RE_THROW throw

#define ACE_RE_THROW_EX( | LABEL ) throw

#define ACE_THROW( | EXCEPTION )

| Initializer:
    \
        do { \
          ACE_UNUSED_ARG(ACE_TRY_ENV); \
          throw EXCEPTION; \
        } while (0)

#define ACE_THROW_INT( | EXCEPTION )

| Initializer:
    \
        do { \
          ACE_UNUSED_ARG(ACE_TRY_ENV); \
          throw EXCEPTION; \
        } while (0)

#define ACE_THROW_RETURN( | EXCEPTION, RETV )

| Initializer:
    \
          do { \
            ACE_UNUSED_ARG(ACE_TRY_ENV); \
            throw EXCEPTION; \
          } while (0)

#define ACE_TRY

| Initializer:
    \
       do \
         { \
           try \
             {

#define ACE_TRY_CHECK

#define ACE_TRY_CHECK_EX( | LABEL )

#define ACE_TRY_ENV _ACE_CORBA_Environment_variable

#define ACE_TRY_EX( | LABEL )

| Initializer:
    \
       do \
         { \
           try \
             {

#define ACE_TRY_NEW_ENV

| Initializer:
    \
       do \
         { \
           CORBA::Environment ACE_TRY_ENV; \
           try \
             {

#define ACE_TRY_THROW( | EXCEPTION ) throw EXCEPTION

#define ACE_TRY_THROW_EX( | EXCEPTION, LABEL ) throw EXCEPTION

#define ACE_WRITE_GUARD_THROW_EX( | MUTEX, OBJ, LOCK, EXCEPTION )

| Initializer:
    \
      ACE_Write_Guard< MUTEX > OBJ (LOCK); \
        if (OBJ.locked () == 0) ACE_THROW_INT (EXCEPTION);