mirror of
https://github.com/corda/corda.git
synced 2025-01-01 10:46:46 +00:00
19 lines
264 B
C
19 lines
264 B
C
#ifndef JNI_UTIL
|
|
#define JNI_UTIL
|
|
|
|
namespace {
|
|
|
|
inline void
|
|
throwNew(JNIEnv* e, const char* class_, const char* message)
|
|
{
|
|
jclass c = e->FindClass(class_);
|
|
if (c) {
|
|
e->ThrowNew(c, message);
|
|
e->DeleteLocalRef(c);
|
|
}
|
|
}
|
|
|
|
} // namespace
|
|
|
|
#endif//JNI_UTIL
|