rust-transit / gtfs-structure

Read a GTFS file
MIT License
61 stars 32 forks source link

Add missing filename to error #70

Closed thbar closed 3 years ago

thbar commented 3 years ago

I'm reading a folder with the following code:

gtfs_structures::Gtfs::new("test_data/optimisation_route_trips")

If one of the mandatory files is not there, I'll get an error message which does not hint me about what is the missing file exactly:

MissingFile("Could not find file: No such file or directory (os error 2)")'

With the following PR, the error message mentions the file name:

MissingFile("Could not find file: stops.txt - No such file or directory (os error 2))")'

Currently I just store the file_name, but it could be better to use the full path.

Tristramg commented 3 years ago

Hello @thbar I’m closing this PR. With #99 we have a better detection of missing files and should fit your needs.