hotspot/src/share/vm/prims/whitebox.hpp
changeset 22786 86644d9539c2
parent 22234 da823d78ad65
child 22792 954fdcaf3b37
--- a/hotspot/src/share/vm/prims/whitebox.hpp	Tue Feb 11 21:32:19 2014 -0800
+++ b/hotspot/src/share/vm/prims/whitebox.hpp	Wed Feb 12 12:01:45 2014 -0800
@@ -36,6 +36,22 @@
 #define WB_END JNI_END
 #define WB_METHOD_DECLARE(result_type) extern "C" result_type JNICALL
 
+#define CHECK_JNI_EXCEPTION_(env, value) \
+  do {                                   \
+    if (env->ExceptionCheck()) {         \
+      env->ExceptionClear();             \
+      return(value);                     \
+    }                                    \
+  } while (0)
+
+#define CHECK_JNI_EXCEPTION(env) \
+  do {                           \
+    if (env->ExceptionCheck()) { \
+      env->ExceptionClear();     \
+      return;                    \
+    }                            \
+  } while (0)
+
 class WhiteBox : public AllStatic {
  private:
   static bool _used;