We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9706cc6 commit f310d64Copy full SHA for f310d64
src/hooks/useSelector.js
@@ -35,14 +35,11 @@ function useSelectorWithStoreAndSubscription(
35
selectedState = latestSelectedState.current
36
}
37
} catch (err) {
38
- let errorMessage = `An error occurred while selecting the store state: `
39
- errorMessage += err.stack ? `\n${err.stack}\n` : err.message
40
-
41
if (latestSubscriptionCallbackError.current) {
42
- errorMessage += `\nThe error may be correlated with this previous error:\n${latestSubscriptionCallbackError.current.stack}\n\nOriginal stack trace:`
+ err.message += `\nThe error may be correlated with this previous error:\n${latestSubscriptionCallbackError.current.stack}\n\n`
43
44
45
- throw new Error(errorMessage)
+ throw err
46
47
48
useIsomorphicLayoutEffect(() => {
0 commit comments