You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Flight] Improve error message when it's not a real Error object (#28327)
Also deals with symbols. Alternative to #28312.
We currently always normalize rejections or thrown values into `Error`
objects. Partly because in prod it'll be an error object and you
shouldn't fork behavior on knowing the value outside a digest. We might
want to even make the message always opaque to avoid being tempted and
then discover in prod that it doesn't work.
However, we do include the message in DEV.
If this is a non-Error object we don't know what the properties mean.
Ofc, we don't want to include too much information in the rendered
string, so we use the general `describeObjectForErrorMessage` helper.
Unfortunately it's pretty conservative about emitting values so it's
likely to exclude any embedded string atm. Could potentially expand it a
bit.
We could in theory try to serialize as much as possible and re-throw the
actual object to allow for inspection to be expanded inside devtools
which is what I plan on for consoles, but since we're normalizing to an
Error this is in conflict with that approach.
DiffTrain build for commit a7144f2.
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -25922,7 +25922,7 @@ if (__DEV__) {
25922
25922
return root;
25923
25923
}
25924
25924
25925
-
var ReactVersion = "18.3.0-canary-adadb8169-20240214";
25925
+
var ReactVersion = "18.3.0-canary-a7144f297-20240214";
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9169,7 +9169,7 @@ var devToolsConfig$jscomp$inline_1024 = {
9169
9169
throwError("TestRenderer does not support findFiberByHostInstance()");
9170
9170
},
9171
9171
bundleType: 0,
9172
-
version: "18.3.0-canary-adadb8169-20240214",
9172
+
version: "18.3.0-canary-a7144f297-20240214",
9173
9173
rendererPackageName: "react-test-renderer"
9174
9174
};
9175
9175
varinternals$jscomp$inline_1205={
@@ -9200,7 +9200,7 @@ var internals$jscomp$inline_1205 = {
Copy file name to clipboardExpand all lines: compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9597,7 +9597,7 @@ var devToolsConfig$jscomp$inline_1066 = {
9597
9597
throwError("TestRenderer does not support findFiberByHostInstance()");
9598
9598
},
9599
9599
bundleType: 0,
9600
-
version: "18.3.0-canary-adadb8169-20240214",
9600
+
version: "18.3.0-canary-a7144f297-20240214",
9601
9601
rendererPackageName: "react-test-renderer"
9602
9602
};
9603
9603
varinternals$jscomp$inline_1246={
@@ -9628,7 +9628,7 @@ var internals$jscomp$inline_1246 = {
0 commit comments