Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion private/react-native-fantom/tester/src/TesterAppDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <react/utils/ContextContainer.h>
#include <react/utils/RunLoopObserverManager.h>
#include <iostream>
#include <stdexcept>
#include <string>
#include <vector>

Expand Down Expand Up @@ -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; });
Expand Down
Loading