- DCPExaminer ex (dcp, true);
-
- bool kdm_matches_any_cpl = false;
- BOOST_FOREACH (shared_ptr<dcp::CPL> i, ex.cpls()) {
- if (i->id() == kdm->cpl_id()) {
- kdm_matches_any_cpl = true;
- }
+ /* Try to decrypt it to get an early preview of any errors */
+ try {
+ decrypt_kdm_with_helpful_error (*kdm);
+ } catch (KDMError& e) {
+ error_dialog (_parent, std_to_wx(e.summary()), std_to_wx(e.detail()));
+ return;
+ } catch (exception& e) {
+ error_dialog (_parent, e.what());
+ return;