The serialization of the context param in the Logger.internalLog method may throw an AssertionError that isn't caught by the try/catch block surrounding the call to the toJsonTree method.
Here is the piece of code (Logger.java line 158 to 166):
try {
if (context != null) {
JsonElement root = gson.toJsonTree(context);
if (root.isJsonObject()) event = root.getAsJsonObject();
}
} catch (Exception e) {
Log.e(TAG,e.getMessage(), e);
}
AssertionError extends Error that extends Throwable. A suggested correction would be:
try {
if (context != null) {
JsonElement root = gson.toJsonTree(context);
if (root.isJsonObject()) event = root.getAsJsonObject();
}
} catch (Throwable e) {
Log.e(TAG,e.getMessage(), e);
}