abstreet
abstreet copied to clipboard
When the data is missing the program just complains about a missing file and exits
It shows the message "Couldn't load montlake (in seattle (us)) No such file or directory" with the Ok button and exits.
It should suggest the user what to do. Otherwise the behavior looks like it is broken.
I'll think about a maintainable way to manage errors here. There's complexity in the IO and file management due to handling native and web in a way that's mostly invisible to application code. Somebody could share a URL to the web version pointing to a map with a typo in the name, resulting in this kind of error. Adding instructions to run the updater or download something wouldn't make any sense in that case.
Most parts of A/B Street now work off the assumption that a city might have to be downloaded first, so missing files is normal. The exception here is that all the apps need to load some map initially. Maybe it'd be even simpler to remove that requirement and start on some dummy built-in map. If loading the map requested by configuration / URL / whatever else fails for any reason, rather than just aborting the whole program, we could at least stay on some kind of UI that lets the user pick (and possibly download) another map.