mirror of
https://github.com/geometer/FBReaderJ.git
synced 2025-10-03 17:59:33 +02:00
do not throw exceptions from native code: this does not work on some devices
This commit is contained in:
parent
64de74460d
commit
ebe5fc182c
5 changed files with 14 additions and 47 deletions
|
@ -32,11 +32,7 @@
|
|||
|
||||
static shared_ptr<FormatPlugin> findCppPlugin(jobject base) {
|
||||
const std::string fileType = AndroidUtil::Method_NativeFormatPlugin_supportedFileType->callForCppString(base);
|
||||
shared_ptr<FormatPlugin> plugin = PluginCollection::Instance().pluginByType(fileType);
|
||||
if (plugin.isNull()) {
|
||||
AndroidUtil::throwRuntimeException("Native FormatPlugin instance is NULL for type " + fileType);
|
||||
}
|
||||
return plugin;
|
||||
return PluginCollection::Instance().pluginByType(fileType);
|
||||
}
|
||||
|
||||
static void fillUids(JNIEnv* env, jobject javaBook, Book &book) {
|
||||
|
@ -287,7 +283,6 @@ JNIEXPORT jint JNICALL Java_org_geometerplus_fbreader_formats_NativeFormatPlugin
|
|||
return 2;
|
||||
}
|
||||
if (!model->flush()) {
|
||||
AndroidUtil::throwCachedCharStorageException("Cannot write file from native code");
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue