From dc60de610f0c997efe84a1e64e67dc2b01cbd3b3 Mon Sep 17 00:00:00 2001 From: Nikolay Igotti Date: Thu, 13 Feb 2025 00:07:41 +0300 Subject: [PATCH] Fix Java --- interop/src/cpp/jni/convertors-jni.cc | 5 +++-- interop/src/cpp/jni/convertors-jni.h | 4 +--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/interop/src/cpp/jni/convertors-jni.cc b/interop/src/cpp/jni/convertors-jni.cc index 7e7addf7d..683625b09 100644 --- a/interop/src/cpp/jni/convertors-jni.cc +++ b/interop/src/cpp/jni/convertors-jni.cc @@ -14,10 +14,11 @@ */ -#define KOALA_INTEROP_MODULE +#define KOALA_INTEROP_MODULE #include "convertors-jni.h" #include "signatures.h" #include "interop-logging.h" +#include "interop-types.h" static const char* nativeModule = "org/koalaui/arkoala/InteropNativeModule"; static const char* nativeModulePrefix = "org/koalaui/arkoala/"; @@ -92,7 +93,7 @@ const std::vector>& JniExports::getM auto it = implementations.find(module); if (it == implementations.end()) { LOGE("Module %s is not registered", module.c_str()); - throw "Fatal error"; + INTEROP_FATAL("Fatal error: not registered module %s", module.c_str()); } return it->second; } diff --git a/interop/src/cpp/jni/convertors-jni.h b/interop/src/cpp/jni/convertors-jni.h index 469fb9686..0ff5fd07d 100644 --- a/interop/src/cpp/jni/convertors-jni.h +++ b/interop/src/cpp/jni/convertors-jni.h @@ -300,9 +300,7 @@ struct InteropTypeConverter { return result; } - static InteropType convertTo(JNIEnv* env, KLength value) { - throw "InteropTypeConverter::convertTo not implemented yet"; - } + static InteropType convertTo(JNIEnv* env, KLength value) = delete; static inline void release(JNIEnv* env, InteropType value, KLength converted) {} }; -- Gitee