diff --git a/private/react-native-fantom/tester/src/TesterAppDelegate.cpp b/private/react-native-fantom/tester/src/TesterAppDelegate.cpp index 7738540eabd..fa2200c9da2 100644 --- a/private/react-native-fantom/tester/src/TesterAppDelegate.cpp +++ b/private/react-native-fantom/tester/src/TesterAppDelegate.cpp @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -169,7 +170,9 @@ void TesterAppDelegate::loadScript( const std::string& bundlePath, const std::string& sourcePath) { LOG(INFO) << "Loading script: " << bundlePath << " source " << sourcePath; - reactHost_->loadScript(bundlePath, sourcePath); + if (!reactHost_->loadScript(bundlePath, sourcePath)) { + throw std::runtime_error("Failed to load the JS bundle at " + bundlePath); + } reactHost_->runOnRuntimeScheduler( [this](jsi::Runtime& runtime) { runtime_ = &runtime; });