From 849edaf4910d72a298c105d62fd2b439b66c7af7 Mon Sep 17 00:00:00 2001 From: benibela Date: Tue, 5 Sep 2023 15:45:38 +0200 Subject: [PATCH] fix videlibri errors not being caught --- .../src/de/benibela/videlibri/activities/ImportExport.kt | 4 ++-- .../src/de/benibela/videlibri/activities/NewLibrary.kt | 2 +- .../src/de/benibela/videlibri/activities/SourceEdit.kt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/android/android/src/de/benibela/videlibri/activities/ImportExport.kt b/android/android/src/de/benibela/videlibri/activities/ImportExport.kt index e1af8ea6..a2a2b6f0 100644 --- a/android/android/src/de/benibela/videlibri/activities/ImportExport.kt +++ b/android/android/src/de/benibela/videlibri/activities/ImportExport.kt @@ -285,7 +285,7 @@ class Import : ImportExportBase() { if (data == null) data = try { Bridge.VLImportAccountsPrepare(filename) - } catch (e: InternalError){ + } catch (e: de.benibela.videlibri.jni.InternalError){ showMessage(getString(R.string.import_file_open_failed) + ":\n" + e.message) null } @@ -330,7 +330,7 @@ class Import : ImportExportBase() { File(state.fileName).delete() state.fileName = "" this.data = null - } catch (e: InternalError) { + } catch (e: de.benibela.videlibri.jni.InternalError) { showMessage(e.message) } } diff --git a/android/android/src/de/benibela/videlibri/activities/NewLibrary.kt b/android/android/src/de/benibela/videlibri/activities/NewLibrary.kt index 14bea11f..c6741fd1 100644 --- a/android/android/src/de/benibela/videlibri/activities/NewLibrary.kt +++ b/android/android/src/de/benibela/videlibri/activities/NewLibrary.kt @@ -115,7 +115,7 @@ class NewLibrary : VideLibriBaseActivity() { val details = try { Bridge.VLGetTemplateDetails(template) ?: return - } catch (e: InternalError) { + } catch (e: de.benibela.videlibri.jni.InternalError) { showMessage(e.localizedMessage) return } diff --git a/android/android/src/de/benibela/videlibri/activities/SourceEdit.kt b/android/android/src/de/benibela/videlibri/activities/SourceEdit.kt index eca2c91f..30392c8f 100644 --- a/android/android/src/de/benibela/videlibri/activities/SourceEdit.kt +++ b/android/android/src/de/benibela/videlibri/activities/SourceEdit.kt @@ -183,7 +183,7 @@ class SourceEdit : VideLibriBaseActivity() { Bridge.VLReloadLibrary(selection2[fileSpinner.selectedItemPosition].replace(".xml", "")) else Bridge.VLReloadTemplate(templateIds[pos - 1]) - } catch (e: InternalError) { + } catch (e: de.benibela.videlibri.jni.InternalError) { showMessage(e.localizedMessage) }