Nice error when a KDM cannot be made because its validity period is not within the...
authorCarl Hetherington <cth@carlh.net>
Sun, 1 Dec 2019 22:15:03 +0000 (23:15 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 1 Dec 2019 22:15:03 +0000 (23:15 +0100)
src/wx/kdm_dialog.cc

index 5a31501cf27bb3e53a14ddb82e774ebe5db9d557..8682fe82f92a460aef24350e665875f981c8f2d4 100644 (file)
@@ -166,6 +166,13 @@ KDMDialog::make_clicked ()
                        !_output->forensic_mark_video(), for_audio
                        );
 
+       } catch (dcp::BadKDMDateError& e) {
+               if (e.starts_too_early()) {
+                       error_dialog (this, _("The KDM start period is before (or close to) the start of the signing certificate's validity period.  Use a later start time for this KDM."));
+               } else {
+                       error_dialog (this, _("The KDM end period is after (or close to) the end of the signing certficates' validity period.  Either use an earlier end time for this KDM or re-create your signing certificates in the DCP-o-matic preferences window."));
+               }
+               return;
        } catch (runtime_error& e) {
                error_dialog (this, std_to_wx(e.what()));
                return;