From 635044290dbd6c3535bddb9428f46277376f2bf3 Mon Sep 17 00:00:00 2001 From: OliE Date: Sat, 13 Feb 2016 11:58:43 +0100 Subject: [PATCH] don't throw an exception if you wrote the wrong birthday instead log as an error. --- .../main/java/com/health/openscale/core/EvaluationSheet.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/android_app/app/src/main/java/com/health/openscale/core/EvaluationSheet.java b/android_app/app/src/main/java/com/health/openscale/core/EvaluationSheet.java index 1adb5fd5..f9935263 100644 --- a/android_app/app/src/main/java/com/health/openscale/core/EvaluationSheet.java +++ b/android_app/app/src/main/java/com/health/openscale/core/EvaluationSheet.java @@ -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);