mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-16 23:55:11 +01:00
Throw different error when given invalid time unit
Affects issues: - Close #2193
This commit is contained in:
parent
3e9eda29fb
commit
08b7ecd3f1
@ -62,7 +62,7 @@ public class TimeSetting extends Setting<Long> {
|
|||||||
TimeUnit unit = TimeUnit.valueOf(unitName.toUpperCase());
|
TimeUnit unit = TimeUnit.valueOf(unitName.toUpperCase());
|
||||||
return unit.toMillis(duration);
|
return unit.toMillis(duration);
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
return -1L;
|
throw new IllegalStateException("Config value for " + path + ".Unit has a bad value: " + e.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user