1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-03 09:49:19 +02:00

code simplification

This commit is contained in:
Nikolay Pultsin 2012-04-07 15:02:53 +01:00
parent bfcdbe9808
commit 30f0a850e2

View file

@ -275,13 +275,11 @@ jbyteArray AndroidUtil::createJavaByteArray(JNIEnv *env, const std::vector<jbyte
} }
void AndroidUtil::throwRuntimeException(const std::string &message) { void AndroidUtil::throwRuntimeException(const std::string &message) {
JNIEnv *env = getEnv(); getEnv()->ThrowNew(Class_java_lang_RuntimeException.j(), message.c_str());
getEnv()->ThrowNew((jclass)env->NewLocalRef(Class_java_lang_RuntimeException.j()), message.c_str());
} }
void AndroidUtil::throwCachedCharStorageException(const std::string &message) { void AndroidUtil::throwCachedCharStorageException(const std::string &message) {
JNIEnv *env = getEnv(); getEnv()->ThrowNew(Class_CachedCharStorageException.j(), message.c_str());
getEnv()->ThrowNew((jclass)env->NewLocalRef(Class_CachedCharStorageException.j()), message.c_str());
} }
/* /*