Skip to content

Commit

Permalink
core: make detectors on a missing track a soft error
Browse files Browse the repository at this point in the history
  • Loading branch information
Khoyo committed Nov 10, 2023
1 parent c1679bd commit 76b0fb8
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,13 @@ private void addSpeedSections(
private void makeWaypoint(HashMap<String, TrackSectionImpl> trackSectionsByID,
RJSRouteWaypoint waypoint, boolean isBufferStop) {
var track = trackSectionsByID.get(waypoint.track);
if (track == null) {
diagnosticRecorder.register(new Warning(String.format(
"Waypoint %s references unknown track %s",
waypoint.id, waypoint.track
)));
return;
}
var newWaypoint = new DetectorImpl(track, waypoint.position, isBufferStop, waypoint.id);
var detectors = detectorLists.get(track);
for (var detector : detectors)
Expand Down

0 comments on commit 76b0fb8

Please sign in to comment.