Skip to content

Commit 163d553

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Delete NoSuchNativeViewException (#53946)
Summary: Pull Request resolved: #53946 NoSuchNativeViewException is legacy architecture and unused, let's delete it changelog: [internal] internal Reviewed By: alanleedev Differential Revision: D83186872 fbshipit-source-id: cbd3b2f537673745e634d0bfc8717fc93f1c0c5f
1 parent 589bf35 commit 163d553

File tree

3 files changed

+5
-39
lines changed

3 files changed

+5
-39
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -706,14 +706,14 @@ public synchronized void measure(int tag, int[] outputBuffer) {
706706
UiThreadUtil.assertOnUiThread();
707707
View v = mTagsToViews.get(tag);
708708
if (v == null) {
709-
throw new NoSuchNativeViewException("No native view for " + tag + " currently exists");
709+
throw new IllegalViewOperationException("No native view for " + tag + " currently exists");
710710
}
711711

712712
View rootView = (View) RootViewUtil.getRootView(v);
713713
// It is possible that the RootView can't be found because this view is no longer on the screen
714714
// and has been removed by clipping
715715
if (rootView == null) {
716-
throw new NoSuchNativeViewException("Native view " + tag + " is no longer on screen");
716+
throw new IllegalViewOperationException("Native view " + tag + " is no longer on screen");
717717
}
718718
computeBoundingBox(rootView, outputBuffer);
719719
int rootX = outputBuffer[0];
@@ -773,7 +773,7 @@ public synchronized void measureInWindow(int tag, int[] outputBuffer) {
773773
UiThreadUtil.assertOnUiThread();
774774
View v = mTagsToViews.get(tag);
775775
if (v == null) {
776-
throw new NoSuchNativeViewException("No native view for " + tag + " currently exists");
776+
throw new IllegalViewOperationException("No native view for " + tag + " currently exists");
777777
}
778778

779779
v.getLocationOnScreen(outputBuffer);

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/NoSuchNativeViewException.kt

Lines changed: 0 additions & 34 deletions
This file was deleted.

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ private MeasureOperation(final int reactTag, final Callback callback) {
418418
public void execute() {
419419
try {
420420
mNativeViewHierarchyManager.measure(mReactTag, mMeasureBuffer);
421-
} catch (NoSuchNativeViewException e) {
421+
} catch (IllegalViewOperationException e) {
422422
// Invoke with no args to signal failure and to allow JS to clean up the callback
423423
// handle.
424424
mCallback.invoke();
@@ -448,7 +448,7 @@ private MeasureInWindowOperation(final int reactTag, final Callback callback) {
448448
public void execute() {
449449
try {
450450
mNativeViewHierarchyManager.measureInWindow(mReactTag, mMeasureBuffer);
451-
} catch (NoSuchNativeViewException e) {
451+
} catch (IllegalViewOperationException e) {
452452
// Invoke with no args to signal failure and to allow JS to clean up the callback
453453
// handle.
454454
mCallback.invoke();

0 commit comments

Comments
 (0)