diff --git a/animator/src/lib.rs b/animator/src/lib.rs index 4f0d2e0..8b1f201 100644 --- a/animator/src/lib.rs +++ b/animator/src/lib.rs @@ -333,7 +333,10 @@ impl ControllerBuilder { pub fn points_from_file(mut self, path: &str) -> Result> { let points: Vec<_> = csv::ReaderBuilder::new() .has_headers(false) - .from_path(path)? + .from_path(path) + .map_err(|e| ControllerError::InternalError { + reason: format!("Could not read CSV file: {}", e), + })? .deserialize() .filter_map(|record: Result<(f64, f64, f64), _>| record.ok()) .collect();