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:
@@ -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);
|
||||
|
Reference in New Issue
Block a user