#include <JniUtil.h>
Public Member Functions | |
JniExceptionChecker (JNIEnv *pEnvInit) | |
~JniExceptionChecker () | |
JNIEnv * | operator-> () const |
Private Member Functions | |
void | checkExceptions () |
Checks whether any Java exception has occurred, and if so throws it as a C++ exception. | |
Private Attributes | |
JNIEnv * | pEnv |
Definition at line 41 of file JniUtil.h.
JniExceptionChecker::JniExceptionChecker | ( | JNIEnv * | pEnvInit | ) | [inline, explicit] |
JniExceptionChecker::~JniExceptionChecker | ( | ) |
Definition at line 518 of file JniUtil.cpp.
References checkExceptions().
00519 { 00520 checkExceptions(); 00521 }
void JniExceptionChecker::checkExceptions | ( | ) | [private] |
Checks whether any Java exception has occurred, and if so throws it as a C++ exception.
Definition at line 509 of file JniUtil.cpp.
References pEnv.
Referenced by ~JniExceptionChecker().
00510 { 00511 jthrowable excn = pEnv->ExceptionOccurred(); 00512 if (excn) { 00513 pEnv->ExceptionClear(); 00514 throw JavaExcn(excn); 00515 } 00516 }
JNIEnv* JniExceptionChecker::operator-> | ( | ) | const [inline] |
JNIEnv* JniExceptionChecker::pEnv [private] |