From 6cba8d7dca6cf3d4b5c9385c6504e1c3bb0a8738 Mon Sep 17 00:00:00 2001 From: Christophe Hurpeau Date: Wed, 20 Jun 2018 22:03:02 +0200 Subject: [PATCH] createNavigationContainer: rethrow the error instead of creating a new one (#4533) Creating a new error makes the stack unreadable in sentry, because the stack is stringified when the error is cast to string to create a new one. Is there another reason to do that ? Alternative possible solution would be to add a method to be able to handle the error ourselves ? --- packages/react-navigation/src/createNavigationContainer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-navigation/src/createNavigationContainer.js b/packages/react-navigation/src/createNavigationContainer.js index 8c3db816..a25bf499 100644 --- a/packages/react-navigation/src/createNavigationContainer.js +++ b/packages/react-navigation/src/createNavigationContainer.js @@ -286,7 +286,7 @@ export default function createNavigationContainer(Component) { ); this.dispatch(NavigationActions.init()); } else { - throw new Error(e); + throw e; } }