Skip to content

Commit

Permalink
State bad duration instead of throwing an exception
Browse files Browse the repository at this point in the history
  • Loading branch information
md5sha256 committed Mar 17, 2024
1 parent 105cc10 commit a09d6f9
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private String parseInternalDuration(String rawDuration, @Nonnull CommandContext
ArgumentParseResult<Duration> parseResult = DURATION_PARSER.parse(context, tempInput);
Optional<Throwable> failure = parseResult.failure();
if (failure.isPresent()) {
throw new CommandExecutionException(failure.get());
throw new AreaShopCommandException("setduration-wrongAmount", rawDuration);
}
Optional<Duration> parsedDuration = parseResult.parsedValue();
if (parsedDuration.isEmpty()) {
Expand Down

0 comments on commit a09d6f9

Please sign in to comment.