Mercurial > hg > truffle
diff src/share/vm/utilities/exceptions.hpp @ 4840:0a10d80352d5
Merge
author | brutisso |
---|---|
date | Fri, 27 Jan 2012 09:04:57 +0100 |
parents | 20334ed5ed3c |
children | d2a62e0f25eb |
line wrap: on
line diff
--- a/src/share/vm/utilities/exceptions.hpp Thu Jan 26 14:14:55 2012 -0800 +++ b/src/share/vm/utilities/exceptions.hpp Fri Jan 27 09:04:57 2012 +0100 @@ -189,6 +189,13 @@ #define CHECK_NULL CHECK_(NULL) #define CHECK_false CHECK_(false) +#define CHECK_AND_CLEAR THREAD); if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_EXCEPTION; return; } (0 +#define CHECK_AND_CLEAR_(result) THREAD); if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_EXCEPTION; return result; } (0 +#define CHECK_AND_CLEAR_0 CHECK_AND_CLEAR_(0) +#define CHECK_AND_CLEAR_NH CHECK_AND_CLEAR_(Handle()) +#define CHECK_AND_CLEAR_NULL CHECK_AND_CLEAR_(NULL) +#define CHECK_AND_CLEAR_false CHECK_AND_CLEAR_(false) + // The THROW... macros should be used to throw an exception. They require a THREAD variable to be // visible within the scope containing the THROW. Usually this is achieved by declaring the function // with a TRAPS argument. @@ -258,7 +265,6 @@ ShouldNotReachHere(); \ } (0 - // ExceptionMark is a stack-allocated helper class for local exception handling. // It is used with the EXCEPTION_MARK macro.