From 3fbf7856d9acb0909357d6b315388471a6b5a69c Mon Sep 17 00:00:00 2001 From: Dan Caspi Date: Wed, 31 Jan 2018 05:15:19 -0800 Subject: [PATCH] Better handling exception in loadScript() Differential Revision: D6856807 fbshipit-source-id: 36c527ee00eef56a5912ad6e4233d6cd61cb5170 --- .../java/com/facebook/react/bridge/FallbackJSBundleLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/bridge/FallbackJSBundleLoader.java b/ReactAndroid/src/main/java/com/facebook/react/bridge/FallbackJSBundleLoader.java index d81949093ec5b1..679f802e3dd020 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/bridge/FallbackJSBundleLoader.java +++ b/ReactAndroid/src/main/java/com/facebook/react/bridge/FallbackJSBundleLoader.java @@ -57,7 +57,7 @@ public String loadScript(CatalystInstanceImpl instance) { try { return getDelegateLoader().loadScript(instance); } catch (Exception e) { - if (!e.getMessage().startsWith(RECOVERABLE)) { + if (e.getMessage() == null || !e.getMessage().startsWith(RECOVERABLE)) { throw e; }