Closed thebigmunch closed 4 years ago
So, I think the best thing to do to start is to strip everything down to a small number of generic exceptions:
AudioMetadataException
- The base exception for all exceptions deriving from audio-metadata
.UnsupportedFormat
- The exception raised when encountering a file format not supported by audio-metadata
. This includes formats that are generally supported, but a specific version or profile of that format is not supported.FormatError
- The exception raised when the binary format of the file is invalid in some way. This would encompass the previous exceptions:
InvalidBlock
InvalidChunk
InvalidFormat
InvalidFrame
in the context of MPEG frames, and invalid binary format of ID3v2 frames.InvalidHeader
TagError
- The exception raised when there is an issue with a tag not related to the binary format. For example. an ID3v2 TYER
frame containg an ISO-8601 datetime instead of just a year. This might be changed to a warning in #18.Adding any more exceptions or adding arguments to these exceptions can be discussed as potential needs arise.