8035640: JNU_CHECK_EXCEPTION should support c++ JNI syntax

Reviewed-by: anthony, alanb
This commit is contained in:
Petr Pchelko 2014-02-25 11:51:25 +04:00
parent da7601aeec
commit 0390c16ac8

View File

@ -297,6 +297,21 @@ JNU_NotifyAll(JNIEnv *env, jobject object);
} \
} while (0) \
#ifdef __cplusplus
#define JNU_CHECK_EXCEPTION(env) \
do { \
if ((env)->ExceptionCheck()) { \
return; \
} \
} while (0) \
#define JNU_CHECK_EXCEPTION_RETURN(env, y) \
do { \
if ((env)->ExceptionCheck()) { \
return (y); \
} \
} while (0)
#else
#define JNU_CHECK_EXCEPTION(env) \
do { \
if ((*env)->ExceptionCheck(env)) { \
@ -310,7 +325,7 @@ JNU_NotifyAll(JNIEnv *env, jobject object);
return (y); \
} \
} while (0)
#endif /* __cplusplus */
/************************************************************************
* Debugging utilities
*/