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 ?
This commit is contained in:
Christophe Hurpeau
2018-06-20 22:03:02 +02:00
parent 5990ec36e5
commit 6cba8d7dca

View File

@@ -286,7 +286,7 @@ export default function createNavigationContainer(Component) {
);
this.dispatch(NavigationActions.init());
} else {
throw new Error(e);
throw e;
}
}