Skip to content

Commit

Permalink
Improve logging message for negative travel time
Browse files Browse the repository at this point in the history
  • Loading branch information
vpaturet committed Sep 25, 2023
1 parent 9a53477 commit 8fb2983
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ public RaptorSearchWindowCalculator calculate() {

int roundUpToNearestMinute(int minTravelTimeInSeconds) {
if (minTravelTimeInSeconds < 0) {
throw new IllegalArgumentException("This operation is not defined for negative numbers.");
throw new IllegalArgumentException(
"This operation is not defined for negative numbers: " + minTravelTimeInSeconds
);
}
// See the UnitTest for verification of this:
// We want: 0 -> 0, 1 -> 60, 59 -> 60 ...
Expand Down

0 comments on commit 8fb2983

Please sign in to comment.