diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-01-09 21:17:47 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-01-10 19:27:18 +0100 |
| commit | 3900fd602f519bc4eaa3ca0ac90f588b0a012aaf (patch) | |
| tree | 4c212f59e36d5b4ca66a5237b7fb6516d95e1517 /src/tools/dcpomatic_kdm_cli.cc | |
| parent | f8295e6039696cc38f505da5e5549608411124a1 (diff) | |
Use exceptions to handle errors in the KDM CLI.
Diffstat (limited to 'src/tools/dcpomatic_kdm_cli.cc')
| -rw-r--r-- | src/tools/dcpomatic_kdm_cli.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/tools/dcpomatic_kdm_cli.cc b/src/tools/dcpomatic_kdm_cli.cc index 9c8c16aef..55997fd13 100644 --- a/src/tools/dcpomatic_kdm_cli.cc +++ b/src/tools/dcpomatic_kdm_cli.cc @@ -25,11 +25,18 @@ #include "lib/kdm_cli.h" +#include <iostream> int main (int argc, char* argv[]) { - return kdm_cli (argc, argv); + auto error = kdm_cli (argc, argv); + if (error) { + std::cerr << *error << "\n"; + exit (EXIT_FAILURE); + } + + return 0; } |
