diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-02-25 00:40:30 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-02-25 00:40:30 +0000 |
| commit | 7a492b88bb30e084d95e5652e8067d21eead1feb (patch) | |
| tree | fa2aa0ca07bdc4ae5bd76137300144ae4ce7977f /src | |
| parent | d08123f5e160b5737fa912cd36119e810abaa4cd (diff) | |
Handle errors in subtitle XML better (#1209).
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/job.cc | 6 | ||||
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/job.cc b/src/lib/job.cc index 61c5b3767..430decceb 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -171,6 +171,12 @@ Job::run_wrapper () set_progress (1); set_state (FINISHED_ERROR); + } catch (dcp::DCPReadError& e) { + + set_error (e.message(), e.detail().get_value_or("")); + set_progress (1); + set_state (FINISHED_ERROR); + } catch (std::exception& e) { set_error ( diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 3e36b575b..d42320bfd 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -181,7 +181,7 @@ public: shared_ptr<Job> last = jm->get().back(); if (last->finished_in_error()) { - error_dialog (this, std_to_wx (last->error_summary()) + ".\n"); + error_dialog(this, std_to_wx(last->error_summary()) + ".\n", std_to_wx(last->error_details())); return; } |
