diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-01-28 20:06:27 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-01-28 20:06:27 +0100 |
| commit | ce0852b6cc2ca1e8196c31fd9512bad2488b8a8c (patch) | |
| tree | 0771c14710054c04ff59eaeee6c9e6b6457accf5 /src | |
| parent | 35fa0425f177b93c3a91d88619659f3c8de03802 (diff) | |
Improve error handling in CLI client slightly.
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/dcpomatic_cli.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tools/dcpomatic_cli.cc b/src/tools/dcpomatic_cli.cc index 9fe2743a6..0162dad8a 100644 --- a/src/tools/dcpomatic_cli.cc +++ b/src/tools/dcpomatic_cli.cc @@ -48,6 +48,7 @@ using std::cout; using std::dynamic_pointer_cast; using std::list; using std::pair; +using std::runtime_error; using std::setw; using std::shared_ptr; using std::string; @@ -404,7 +405,12 @@ main (int argc, char* argv[]) ); JobManager::instance()->add (job); } else { - make_dcp (film, behaviour); + try { + make_dcp (film, behaviour); + } catch (runtime_error& e) { + std::cerr << "Could not make DCP: " << e.what() << "\n"; + exit(EXIT_FAILURE); + } } bool const error = show_jobs_on_console (progress); |
