Skip to content

Commit 8a51e6a

Browse files
committed
Revert changes
1 parent b36a4ae commit 8a51e6a

2 files changed

Lines changed: 0 additions & 22 deletions

File tree

Common/cpp/NativeModules/NativeReanimatedModule.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,6 @@ void NativeReanimatedModule::onEvent(
355355
if (mapperRegistry->needRunOnRender()) {
356356
maybeRequestRender();
357357
}
358-
// } catch (jsi::JSError &e) {
359-
// throw e; // TODO: use AndroidErrorHandler here?
360358
} catch (std::exception &e) {
361359
std::string str = e.what();
362360
this->errorHandler->setError(str);
@@ -392,14 +390,6 @@ void NativeReanimatedModule::onRender(double timestampMs) {
392390
if (mapperRegistry->needRunOnRender()) {
393391
maybeRequestRender();
394392
}
395-
// } catch (jsi::JSError &e) {
396-
// // This block is executed when `useAnimatedStyle` worklet throws a
397-
// // JavaScript error on Android. The exception is passed to Java via
398-
// // `translatePendingCppExceptionToJavaException` and then gets handled
399-
// and
400-
// // shown on the UI by React Native internals.
401-
// // TODO: explain what happens on iOS
402-
// throw e;
403393
} catch (std::exception &e) {
404394
std::string str = e.what();
405395
this->errorHandler->setError(str);

Common/cpp/SharedItems/ShareableValue.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -414,13 +414,7 @@ jsi::Value ShareableValue::toJSValue(jsi::Runtime &rt) {
414414
} else {
415415
res = funPtr->call(rt, args, count);
416416
}
417-
// } catch (jsi::JSError &e) {
418-
// // For some reason (most likely due to duplicated symbols),
419-
// this
420-
// // block doesn't catch `jsi::JSError` on iOS.
421-
// throw e;
422417
} catch (std::exception &e) {
423-
// This block catches `jsi::JSError` on iOS.
424418
std::string str = e.what();
425419
runtimeManager->errorHandler->setError(str);
426420
runtimeManager->errorHandler->raise();
@@ -483,13 +477,7 @@ jsi::Value ShareableValue::toJSValue(jsi::Runtime &rt) {
483477
rt,
484478
static_cast<const jsi::Value *>(args),
485479
static_cast<size_t>(params.size()));
486-
// } catch (jsi::JSError &e) {
487-
// // For some reason (most likely due to duplicated symbols),
488-
// this
489-
// // block doesn't catch `jsi::JSError` on iOS.
490-
// throw e;
491480
} catch (std::exception &e) {
492-
// This block catches `jsi::JSError` on iOS.
493481
std::string str = e.what();
494482
runtimeManager->errorHandler->setError(str);
495483
runtimeManager->errorHandler->raise();

0 commit comments

Comments
 (0)