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:43:25 +0000 |
| commit | e44ed94827f1c0674358f04cc8657a36eef53d29 (patch) | |
| tree | 1672ec0c013e5623158fb352c4ad7f564a506dff /src | |
| parent | 14cccb179fff7bbbf422e13f9d2e3264239c93c7 (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 ccb75fa93..5134475ce 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -174,6 +174,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; } |
