1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-25 17:42:29 +02:00

don't throw an exception if you wrote the wrong birthday instead log as an error.

This commit is contained in:
OliE
2016-02-13 11:58:43 +01:00
parent 2737a385a2
commit 635044290d

View File

@@ -15,6 +15,8 @@
*/
package com.health.openscale.core;
import android.util.Log;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
@@ -292,7 +294,7 @@ public class EvaluationSheet {
birthDate.setTime(dateOfBirth);
if (birthDate.after(today)) {
throw new IllegalArgumentException("Can't be born in the future");
Log.e("EvaluationSheet", "Can't evaluate your body values because you can't be born in the future");
}
age = today.get(Calendar.YEAR) - birthDate.get(Calendar.YEAR);