Give a better error when a KDMFormatError is thrown (DoM #2446). v1.8.57
authorCarl Hetherington <cth@carlh.net>
Sun, 12 Feb 2023 22:09:46 +0000 (23:09 +0100)
committerCarl Hetherington <cth@carlh.net>
Sun, 12 Feb 2023 22:09:46 +0000 (23:09 +0100)
tools/dcpkdm.cc

index d8a10fa35eae8058684b41cffee29787c629d7c4..434d1652f181f1f6bda74fbe2cf9d5143d405475 100644 (file)
@@ -142,6 +142,11 @@ try
 
        return 0;
 }
+catch (dcp::KDMFormatError& e)
+{
+       cerr << "Could not parse KDM file.  Is it a valid KDM?" << "\n";
+       exit(EXIT_FAILURE);
+}
 catch (std::exception& e)
 {
        cerr << "Error: " << e.what() << "\n";