mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2025-03-07 17:28:03 +08: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());
|
||||
return unit.toMillis(duration);
|
||||
} 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