π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mob] Catch unexpected error in custom plugin
Neeraj Gupta756954ae45db
diff --git a/mobile/plugins/onnx_dart/android/src/main/kotlin/io/ente/photos/onnx_dart/OnnxDartPlugin.kt b/mobile/plugins/onnx_dart/android/src/main/kotlin/io/ente/photos/onnx_dart/OnnxDartPlugin.ktindex ad6419c8b3..2caa2c4236 100644--- a/mobile/plugins/onnx_dart/android/src/main/kotlin/io/ente/photos/onnx_dart/OnnxDartPlugin.kt+++ b/mobile/plugins/onnx_dart/android/src/main/kotlin/io/ente/photos/onnx_dart/OnnxDartPlugin.kt@@ -197,6 +197,11 @@ class OnnxDartPlugin: FlutterPlugin, MethodCallHandler {withContext(Dispatchers.Main) {result.error("PREDICTION_ERROR", "Error during prediction: ${e.message}", null)}+ } catch (e: Exception) {+ Log.e(TAG, "Error during prediction: ${e.message}", e)+ withContext(Dispatchers.Main) {+ result.error("UNHANDLED_ERROR", "Error during prediction: ${e.message}", null)+ }}}}