Skip to content

Commit 9a9d908

Browse files
committed
refactor(playservices/gcm): improve try/catch
1 parent 5f2b809 commit 9a9d908

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

.idea/modules.xml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AndroidSDK/src/com/leanplum/LeanplumGcmProvider.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ public String getRegistrationId() {
9393
Log.w("There was a problem setting up GCM, please make sure you follow instructions " +
9494
"on how to set it up. Please verify that you are using correct version of " +
9595
"Google Play Services and Android Support Library v4.");
96+
Util.handleException(t);
9697
}
9798
return registrationId;
9899
}

AndroidSDK/src/com/leanplum/internal/Util.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ private static DeviceIdInfo getAdvertisingId(Context caller) throws Exception {
191191
return new DeviceIdInfo(deviceId, limitedTracking);
192192
}
193193
}
194-
} catch (Throwable ignored) {
195-
Log.e("Error getting advertising ID. Google Play Services are not available.");
194+
} catch (Throwable t) {
195+
Log.e("Error getting advertising ID. Google Play Services are not available: ", t);
196196
}
197197
return null;
198198
}

0 commit comments

Comments
 (0)