File tree Expand file tree Collapse file tree 1 file changed +13
-6
lines changed
Branch-SDK/src/main/java/io/branch/referral Expand file tree Collapse file tree 1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -121,15 +121,22 @@ class BranchConfigurationController {
121121 fun serializeConfiguration (): JSONObject {
122122 return try {
123123 JSONObject ().apply {
124- put(" expectDelayedSessionInitialization" , getDelayedSessionInitUsed())
125- put(" testMode" , isTestModeEnabled())
126- put(" trackingDisabled" , isTrackingDisabled())
127- put(" instantDeepLinkingEnabled" , isInstantDeepLinkingEnabled())
128- put(" deferInitForPluginRuntime" , isDeferInitForPluginRuntime())
124+ put(\ " expectDelayedSessionInitialization\ " , getDelayedSessionInitUsed())
125+ put(\ " testMode\ " , isTestModeEnabled())
126+ put(\ " trackingDisabled\ " , isTrackingDisabled())
127+ put(\ " instantDeepLinkingEnabled\ " , isInstantDeepLinkingEnabled())
128+ put(\ " deferInitForPluginRuntime\ " , isDeferInitForPluginRuntime())
129129 }
130+ } catch (e: NullPointerException) {
131+ BranchLogger.w(\" Error serializing configuration - null reference: ${e.message} \" )
132+ JSONObject()
133+ } catch (e: JSONException) {
134+ BranchLogger.w(\" Error serializing configuration - JSON error: ${e.message} \" )
135+ JSONObject()
130136 } catch (e: Exception) {
131- BranchLogger .w(" Error serializing configuration: ${e.message} " )
137+ BranchLogger.w(\ " Error serializing configuration - unexpected error : ${e.message} \ " )
132138 JSONObject()
133139 }
134140 }
141+ }
135142}
You can’t perform that action at this time.
0 commit comments