From 8fb2983958bc2992782b26ffd5402dab3edb4e09 Mon Sep 17 00:00:00 2001 From: Vincent Paturet Date: Mon, 25 Sep 2023 13:14:36 +0200 Subject: [PATCH] Improve logging message for negative travel time --- .../rangeraptor/transit/RaptorSearchWindowCalculator.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/RaptorSearchWindowCalculator.java b/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/RaptorSearchWindowCalculator.java index 2fd9de738be..31608622bc5 100644 --- a/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/RaptorSearchWindowCalculator.java +++ b/src/main/java/org/opentripplanner/raptor/rangeraptor/transit/RaptorSearchWindowCalculator.java @@ -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 ...