projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Use exceptions to handle errors in the KDM CLI.
[dcpomatic.git]
/
src
/
tools
/
dcpomatic_kdm_cli.cc
diff --git
a/src/tools/dcpomatic_kdm_cli.cc
b/src/tools/dcpomatic_kdm_cli.cc
index 9c8c16aef49b72584d7fe0fb7cf78fc171e28821..55997fd130e9000c14c6616d17f2960978058341 100644
(file)
--- 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;
}