ellington-project / ellington

Automated tempo estimation for swing dance DJs
GNU General Public License v3.0
10 stars 0 forks source link

Better error handling #3

Open AdamBrouwersHarries opened 6 years ago

AdamBrouwersHarries commented 6 years ago

As of right now, there are 26 unwrap calls in the codebase. Any of those could panic, and should be handled properly!

AdamBrouwersHarries commented 6 years ago

As of #7a5eacd we're down to 13 unwrap calls! Hooray!

bag-man commented 6 years ago

An issue I ran into immediately:

ERROR 2018-07-27T19:34:17Z: libellington::shelltools::generic: Got error Os { code: 2, kind: NotFound, message: "No such file or directory" } while running command ["id3v2", "--list", "/home/owg1/Music/Rock/Goldfinger/Spokesman.mp3"]

The error is caused by not having id3v2 installed, but isn't super clear to the user. Perhaps check for those tools availability and throw errors based on that first. Might be nice to update the readme to make the dependencies clearer as part of an installation section.

Thanks for doing this though I've always wanted to try! I will let you know how it goes.

AdamBrouwersHarries commented 6 years ago

Good shout - I should probably include that in the tests, as well as a startup test. The long term plan is to remove all the dependencies on command line programs (i.e. id3v2 et al).

For the meantime though, I'm working on packaging ellington for various operating systems (e.g. debian, osx), so that the command line programs should be automatically installed.