From ba13ac156b960ae5e0052a2069e272b9f23c6b5f Mon Sep 17 00:00:00 2001 From: Dustin Carlino Date: Mon, 13 Feb 2023 17:52:37 +0000 Subject: [PATCH] Remove the panic handler for generating movements. After regenerating all data, verified no problems! #1061 --- map_model/src/map.rs | 14 +------------- tests/src/main.rs | 6 +++--- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/map_model/src/map.rs b/map_model/src/map.rs index 9f653b098c..cecacec021 100644 --- a/map_model/src/map.rs +++ b/map_model/src/map.rs @@ -880,19 +880,7 @@ impl Map { let movements = timer.parallelize( "generate movements", self.intersections.iter().map(|i| i.id).collect(), - |i| { - // TODO Hack around geometry problems generating these, usually at intersections - // without valid geometry. Stuff downstream probably breaks. - match std::panic::catch_unwind(std::panic::AssertUnwindSafe(|| { - Movement::for_i(i, self) - })) { - Ok(result) => result, - Err(err) => { - error!("Movement::for_i broke on {i}: {err:?}"); - BTreeMap::new() - } - } - }, + |i| Movement::for_i(i, self), ); for (i, movements) in self.intersections.iter_mut().zip(movements.into_iter()) { i.movements = movements; diff --git a/tests/src/main.rs b/tests/src/main.rs index c458f84eed..0710883da5 100644 --- a/tests/src/main.rs +++ b/tests/src/main.rs @@ -15,6 +15,9 @@ use synthpop::{IndividTrip, PersonSpec, Scenario, TripEndpoint, TripMode, TripPu fn main() -> Result<()> { abstutil::logger::setup(); + if true { + geometry_test()?; + } test_blockfinding()?; test_lane_changing(&import_map(abstio::path( "../tests/input/lane_selection.osm", @@ -31,9 +34,6 @@ fn main() -> Result<()> { if false { smoke_test()?; } - if true { - geometry_test()?; - } Ok(()) }