src/share/vm/utilities/exceptions.hpp

changeset 3452
20334ed5ed3c
parent 3138
f6f3bb0ee072
child 3900
d2a62e0f25eb
     1.1 --- a/src/share/vm/utilities/exceptions.hpp	Thu Jan 26 16:49:22 2012 +0100
     1.2 +++ b/src/share/vm/utilities/exceptions.hpp	Thu Jan 26 12:15:24 2012 -0800
     1.3 @@ -189,6 +189,13 @@
     1.4  #define CHECK_NULL                               CHECK_(NULL)
     1.5  #define CHECK_false                              CHECK_(false)
     1.6  
     1.7 +#define CHECK_AND_CLEAR                         THREAD); if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_EXCEPTION; return;        } (0
     1.8 +#define CHECK_AND_CLEAR_(result)                THREAD); if (HAS_PENDING_EXCEPTION) { CLEAR_PENDING_EXCEPTION; return result; } (0
     1.9 +#define CHECK_AND_CLEAR_0                       CHECK_AND_CLEAR_(0)
    1.10 +#define CHECK_AND_CLEAR_NH                      CHECK_AND_CLEAR_(Handle())
    1.11 +#define CHECK_AND_CLEAR_NULL                    CHECK_AND_CLEAR_(NULL)
    1.12 +#define CHECK_AND_CLEAR_false                   CHECK_AND_CLEAR_(false)
    1.13 +
    1.14  // The THROW... macros should be used to throw an exception. They require a THREAD variable to be
    1.15  // visible within the scope containing the THROW. Usually this is achieved by declaring the function
    1.16  // with a TRAPS argument.
    1.17 @@ -258,7 +265,6 @@
    1.18      ShouldNotReachHere();                  \
    1.19    } (0
    1.20  
    1.21 -
    1.22  // ExceptionMark is a stack-allocated helper class for local exception handling.
    1.23  // It is used with the EXCEPTION_MARK macro.
    1.24  

mercurial