diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-01-09 21:17:47 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-01-11 09:33:24 +0100 |
| commit | 8af4df634d45f50e06d3e1c32cf071d54e34b6f8 (patch) | |
| tree | 5c1eece4d04052cf9a2deb495c4ab914e2f8b08a /src/tools/dcpomatic_kdm_cli.cc | |
| parent | 0330b684fe616b465e65b67f7d995e659fa83fca (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; } |
