summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-01-28 20:06:27 +0100
committerCarl Hetherington <cth@carlh.net>2022-03-09 17:04:02 +0100
commitfbdc606db9bb59f7c4f4ccab0c82e13552c87abf (patch)
tree934b7c2b6343d3216719b23522c5f77eedfb9171 /src
parentd4422f1e52b559ec7d5552eb6e5e63536b66e0de (diff)
Improve error handling in CLI client slightly.
Diffstat (limited to 'src')
-rw-r--r--src/tools/dcpomatic_cli.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tools/dcpomatic_cli.cc b/src/tools/dcpomatic_cli.cc
index be4d3f513..1293eab0f 100644
--- a/src/tools/dcpomatic_cli.cc
+++ b/src/tools/dcpomatic_cli.cc
@@ -47,6 +47,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;
@@ -403,7 +404,12 @@ main (int argc, char* argv[])
);
JobManager::instance()->add (job);
} else {
- film->make_dcp (behaviour);
+ try {
+ film->make_dcp (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);