summaryrefslogtreecommitdiff
path: root/ace/CORBA_macros.h
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-28 00:53:07 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-28 00:53:07 +0000
commit5272c1549e8f6b16c0449cadb82f6006a8a579ad (patch)
tree6f0ed7a9e819fbdf55aba31951e6248ddf1dc45d /ace/CORBA_macros.h
parentef0fcb220b6edf717cebb66815a9739c7184a92d (diff)
downloadATCD-5272c1549e8f6b16c0449cadb82f6006a8a579ad.tar.gz
ChangeLogTag:Sun Jun 27 18:17:43 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'ace/CORBA_macros.h')
-rw-r--r--ace/CORBA_macros.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/ace/CORBA_macros.h b/ace/CORBA_macros.h
index 59e8e35a569..e41d7dee878 100644
--- a/ace/CORBA_macros.h
+++ b/ace/CORBA_macros.h
@@ -81,14 +81,18 @@
// ACE_THROW_INT should not be used by the user.
# define ACE_THROW_INT(EXCEPTION) \
- ACE_UNUSED_ARG(ACE_TRY_ENV); \
- throw EXCEPTION
+ do { \
+ ACE_UNUSED_ARG(ACE_TRY_ENV); \
+ throw EXCEPTION; \
+ } while (0)
// Throwing an exception is easy. These two macros should _NOT_ be
// used within try blocks.
# define ACE_THROW(EXCEPTION) \
- ACE_UNUSED_ARG(ACE_TRY_ENV); \
- throw EXCEPTION
+ do { \
+ ACE_UNUSED_ARG(ACE_TRY_ENV); \
+ throw EXCEPTION; \
+ } while (0)
// Throwing an exception when the function reqires a return value.
# if defined (WIN32) || defined (__HP_aCC)
@@ -101,8 +105,10 @@
} while (0)
# else /* WIN32 */
# define ACE_THROW_RETURN(EXCEPTION,RETV) \
- ACE_UNUSED_ARG(ACE_TRY_ENV); \
- throw EXCEPTION
+ do { \
+ ACE_UNUSED_ARG(ACE_TRY_ENV); \
+ throw EXCEPTION; \
+ } while (0)
# endif /* WIN32 */
// For compilers with native exceptions, we can simply use