From b88d89b196e450846a19e9058e6391822f2dba46 Mon Sep 17 00:00:00 2001 From: Salakar Date: Fri, 6 Oct 2017 22:37:27 +0100 Subject: [PATCH] [android][firestore] log type rather than value on error --- .../io/invertase/firebase/firestore/FirestoreSerialize.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/android/src/main/java/io/invertase/firebase/firestore/FirestoreSerialize.java b/android/src/main/java/io/invertase/firebase/firestore/FirestoreSerialize.java index 9df68623..6ab033ae 100644 --- a/android/src/main/java/io/invertase/firebase/firestore/FirestoreSerialize.java +++ b/android/src/main/java/io/invertase/firebase/firestore/FirestoreSerialize.java @@ -7,7 +7,6 @@ import com.google.firebase.firestore.DocumentChange; import com.google.firebase.firestore.DocumentSnapshot; import com.google.firebase.firestore.QuerySnapshot; -import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -161,7 +160,7 @@ public class FirestoreSerialize { Object[] listAsArray = list.toArray(new Object[list.size()]); writableArray.pushArray(objectArrayToWritable(listAsArray)); } else { - throw new RuntimeException("Cannot convert object of type " + item); + throw new RuntimeException("Cannot convert object of type " + itemClass); } } @@ -198,7 +197,7 @@ public class FirestoreSerialize { Object[] array = list.toArray(new Object[list.size()]); map.putArray(key, objectArrayToWritable(array)); } else { - throw new RuntimeException("Cannot convert object of type " + value); + throw new RuntimeException("Cannot convert object of type " + valueClass); } } }