diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-02-12 14:39:55 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2007-02-12 14:39:55 +0000 |
commit | 17065ba470b54d554dc946fabe3e2f7db36a3556 (patch) | |
tree | 2b531562b76eda362c7348c704054a909c431053 /ACE/ace/CORBA_macros.h | |
parent | 05a4fa5b354821ecfc686887a75ac07f7fe202d8 (diff) | |
download | ATCD-17065ba470b54d554dc946fabe3e2f7db36a3556.tar.gz |
Diffstat (limited to 'ACE/ace/CORBA_macros.h')
-rw-r--r-- | ACE/ace/CORBA_macros.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/ACE/ace/CORBA_macros.h b/ACE/ace/CORBA_macros.h index 473afac3291..a9afe79899f 100644 --- a/ACE/ace/CORBA_macros.h +++ b/ACE/ace/CORBA_macros.h @@ -47,6 +47,8 @@ # define ACE_del_bad_alloc #endif +#if !defined (ACE_LACKS_DEPRECATED_MACROS) + // If you wish to you use these macros for emulating exceptions on // platforms which lack native exception support, you need to do the // following: @@ -406,34 +408,38 @@ #endif /* ! ACE_USES_NATIVE_EXCEPTIONS */ +#endif /* !ACE_LACKS_DEPRECATED_MACROS */ + // ACE_HAS_EXCEPTIONS is not the same as ACE_NEW_THROWS_EXCEPTIONS. #if defined(ACE_NEW_THROWS_EXCEPTIONS) # define ACE_NEW_THROW_EX(POINTER,CONSTRUCTOR,EXCEPTION) \ do { try { POINTER = new CONSTRUCTOR; } \ - catch (ACE_bad_alloc) { ACE_del_bad_alloc errno = ENOMEM; ACE_THROW_INT (EXCEPTION); } \ + catch (ACE_bad_alloc) { ACE_del_bad_alloc errno = ENOMEM; throw (EXCEPTION); } \ } while (0) #else /* ! ACE_NEW_THROWS_EXCEPTIONS */ # define ACE_NEW_THROW_EX(POINTER,CONSTRUCTOR,EXCEPTION) \ do { POINTER = new CONSTRUCTOR; \ - if (POINTER == 0) { errno = ENOMEM; ACE_THROW_INT (EXCEPTION); } \ + if (POINTER == 0) { errno = ENOMEM; throw (EXCEPTION); } \ } while (0) #endif /* ACE_NEW_THROWS_EXCEPTIONS */ # define ACE_GUARD_THROW_EX(MUTEX,OBJ,LOCK,EXCEPTION) \ ACE_Guard< MUTEX > OBJ (LOCK); \ - if (OBJ.locked () == 0) ACE_THROW_INT (EXCEPTION); + if (OBJ.locked () == 0) throw (EXCEPTION); # define ACE_READ_GUARD_THROW_EX(MUTEX,OBJ,LOCK,EXCEPTION) \ ACE_Read_Guard< MUTEX > OBJ (LOCK); \ - if (OBJ.locked () == 0) ACE_THROW_INT (EXCEPTION); + if (OBJ.locked () == 0) throw (EXCEPTION); # define ACE_WRITE_GUARD_THROW_EX(MUTEX,OBJ,LOCK,EXCEPTION) \ ACE_Write_Guard< MUTEX > OBJ (LOCK); \ - if (OBJ.locked () == 0) ACE_THROW_INT (EXCEPTION); + if (OBJ.locked () == 0) throw (EXCEPTION); + +#if !defined (ACE_LACKS_DEPRECATED_MACROS) //@{ /** @@ -551,6 +557,8 @@ # define ACE_PRINT_EXCEPTION(EX,INFO) ACE_PRINT_TAO_EXCEPTION(EX,INFO) # endif /* ACE_PRINT_EXCEPTION */ +#endif /* !ACE_LACKS_DEPRECATED_MACROS */ + #include /**/ "ace/post.h" #endif /* ACE_CORBA_MACROS_H */ |