Give a better error when entering a bad Dolby/Doremi serial number.
authorCarl Hetherington <cth@carlh.net>
Fri, 13 Jan 2023 21:33:03 +0000 (22:33 +0100)
committerCarl Hetherington <cth@carlh.net>
Fri, 13 Jan 2023 21:33:03 +0000 (22:33 +0100)
src/wx/dolby_doremi_certificate_panel.cc

index 25f7392396b39000333cbdaf60f11cb781774f26..5a578a7eccedad9fcae64e9ab867008895b7302d 100644 (file)
@@ -179,6 +179,8 @@ DolbyDoremiCertificatePanel::do_download ()
                }
        }
 
+       list<string> errors;
+
        if (starts_with_digit) {
                try_dcp2000 (urls, files, prefix, serial);
                try_imb (urls, files, prefix, serial);
@@ -190,9 +192,10 @@ DolbyDoremiCertificatePanel::do_download ()
                try_cat745 (urls, files, prefix, serial);
        } else if (starting_char == 'F') {
                try_cp850 (urls, files, prefix, serial);
+       } else {
+               errors.push_back(wx_to_std(_("Unrecognised serial number format (does not start with a number, H or F)")));
        }
 
-       list<string> errors;
        bool ok = false;
        auto i = urls.begin ();
        auto j = files.begin ();