Skip to content

Commit

Permalink
Merge pull request opentripplanner#5375 from entur/Improving_negative…
Browse files Browse the repository at this point in the history
…_travel_time_logging_message

Improve logging message for negative travel time
  • Loading branch information
t2gran authored Sep 25, 2023
2 parents 9a53477 + 8fb2983 commit be789e3
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 be789e3

Please sign in to comment.