diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-08-27 22:34:37 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-08-27 22:34:37 +0100 |
| commit | 77d2514fee2919c32e4db92b8f75369754d17fb5 (patch) | |
| tree | 336a71e7f066bada0c5cfa4850a7560db1025830 /src/tools | |
| parent | 01558523df6e3e87403fbee5db476b89d8292e4c (diff) | |
Slightly better errors when the player fails to load a DCP.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 90cc818ca..cdacee784 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -464,6 +464,21 @@ public: private: + bool report_errors_from_last_job (wxWindow* parent) const + { + JobManager* jm = JobManager::instance (); + + DCPOMATIC_ASSERT (!jm->get().empty()); + + shared_ptr<Job> last = jm->get().back(); + if (last->finished_in_error()) { + error_dialog(parent, wxString::Format(_("Could not load DCP.\n\n%s."), std_to_wx(last->error_summary()).data()), std_to_wx(last->error_details())); + return false; + } + + return true; + } + void setup_menu (wxMenuBar* m) { _file_menu = new wxMenu; |
