Skip to content

Commit 658f870

Browse files
committed
Restore null throwable loggingin the original recordException
1 parent b384a7c commit 658f870

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

firebase-crashlytics/src/main/java/com/google/firebase/crashlytics/FirebaseCrashlytics.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,11 @@ public static FirebaseCrashlytics getInstance() {
205205
* @param throwable a {@link Throwable} to be recorded as a non-fatal event.
206206
*/
207207
public void recordException(@NonNull Throwable throwable) {
208+
if (throwable == null) { // Users could call this with null despite the annotation.
209+
Logger.getLogger().w("A null value was passed to recordException. Ignoring.");
210+
return;
211+
}
212+
208213
core.logException(throwable, Map.of());
209214
}
210215

0 commit comments

Comments
 (0)