mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Better error messages for "unable to find view for viewstate"
Summary: Better error messages for "unable to find view for viewstate" Reviewed By: shergin Differential Revision: D16537698 fbshipit-source-id: a8ea681882207cd894e3703c6c0a04346fa4ce06
This commit is contained in:
committed by
Facebook Github Bot
parent
ebb3243907
commit
44be1f1516
@@ -17,7 +17,6 @@ import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.bridge.ReadableNativeMap;
|
||||
import com.facebook.react.bridge.SoftAssertions;
|
||||
import com.facebook.react.bridge.UiThreadUtil;
|
||||
import com.facebook.react.fabric.FabricUIManager;
|
||||
import com.facebook.react.fabric.events.EventEmitterWrapper;
|
||||
@@ -107,7 +106,8 @@ public class MountingManager {
|
||||
ViewState viewState = getViewState(tag);
|
||||
final View view = viewState.mView;
|
||||
if (view == null) {
|
||||
throw new IllegalStateException("Unable to find view for viewState " + viewState);
|
||||
throw new IllegalStateException(
|
||||
"Unable to find view for viewState " + viewState + " and tag " + tag);
|
||||
}
|
||||
getViewGroupManager(parentViewState).addView(parentView, view, index);
|
||||
}
|
||||
@@ -115,7 +115,7 @@ public class MountingManager {
|
||||
private ViewState getViewState(int tag) {
|
||||
ViewState viewState = mTagToViewState.get(tag);
|
||||
if (viewState == null) {
|
||||
throw new IllegalStateException("Unable to find viewState view " + viewState);
|
||||
throw new IllegalStateException("Unable to find viewState view for tag " + tag);
|
||||
}
|
||||
return viewState;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user