diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-09-15 14:00:56 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2016-09-15 14:07:48 +0800 |
commit | e21a1dc662e3d8fde14a3bfa30cb1b9d8badbdc0 (patch) | |
tree | 121e15c7b0447f0769c247f0b09a72b2c4017655 /platform | |
parent | 446aead5a5913f5c5613b466454af195f5387b01 (diff) | |
download | mupdf-e21a1dc662e3d8fde14a3bfa30cb1b9d8badbdc0.tar.xz |
JNI: Don't replace Java exception with one from fitz.
The JNI interface throws exceptions of its own,
keep those instead of replacing them.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/java/mupdf_native.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/platform/java/mupdf_native.c b/platform/java/mupdf_native.c index d886ef19..4aec3124 100644 --- a/platform/java/mupdf_native.c +++ b/platform/java/mupdf_native.c @@ -3732,26 +3732,21 @@ FUN(Document_proofNative)(JNIEnv *env, jobject self, jstring jCurrentPath, jstri if (!jDisplayProfile) { jni_throw_arg(env, "displayProfile must not be null"); return NULL; } currentPath = (*env)->GetStringUTFChars(env, jCurrentPath, NULL); - if (currentPath == NULL) - { - jni_throw(env, FZ_ERROR_GENERIC, "Document_proofNative failed"); + if (!currentPath) return NULL; - } printProfile = (*env)->GetStringUTFChars(env, jPrintProfile, NULL); - if (printProfile == NULL) + if (!printProfile) { - jni_throw(env, FZ_ERROR_GENERIC, "Document_proofNative failed"); (*env)->ReleaseStringUTFChars(env, jCurrentPath, currentPath); return NULL; } displayProfile = (*env)->GetStringUTFChars(env, jDisplayProfile, NULL); - if (displayProfile == NULL) + if (!displayProfile) { (*env)->ReleaseStringUTFChars(env, jCurrentPath, currentPath); (*env)->ReleaseStringUTFChars(env, jPrintProfile, printProfile); - jni_throw(env, FZ_ERROR_GENERIC, "Document_proofNative failed"); return NULL; } |