diff --git a/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp b/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp index aefd987..c2e06fb 100644 --- a/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp +++ b/node_modules/react-native-nitro-modules/cpp/core/HybridFunction.hpp @@ -23,6 +23,10 @@ struct JSIConverter; #include #include +#ifdef ANDROID +#include +#endif + namespace margelo::nitro { using namespace facebook; @@ -118,6 +122,10 @@ public: std::string funcName = getHybridFuncFullName(kind, name, hybridInstance.get()); std::string message = exception.what(); throw jsi::JSError(runtime, funcName + ": " + message); + } catch (const jni::JniException& exception) { + std::string funcName = getHybridFuncFullName(kind, name, hybridInstance.get()); + std::string message = exception.what(); + throw jsi::JSError(runtime, funcName + ": " + message); #pragma clang diagnostic pop #endif } catch (...) {