xsco / libdjinterop

C++ library for access to DJ record libraries
GNU Lesser General Public License v3.0
49 stars 8 forks source link

Library error messages about invalid data should explain how the data is invalid #125

Open mr-smidge opened 4 months ago

mr-smidge commented 4 months ago

Some error messages emitted from the library, when invalid data is encountered, explain vaguely that something is wrong, but could be clearer in explaining how that data is invalid.

For example:

    if (raw_data.size() < 27)
    {
        throw std::invalid_argument{
            "Overview waveform data has less than the minimum length of "
            "27 bytes"};
    }

The above message would be more helpful if it explained how many bytes the raw data actually was.