Slightly nicer errors from dcpkdm.
authorCarl Hetherington <cth@carlh.net>
Wed, 12 Aug 2020 22:45:42 +0000 (00:45 +0200)
committerCarl Hetherington <cth@carlh.net>
Wed, 12 Aug 2020 22:45:42 +0000 (00:45 +0200)
tools/dcpkdm.cc

index 9fb228eea1cce9da1243a71f49be9a80c3261e7c..c34454be7cd835df74a4820d40a5fcefd84b32ee 100644 (file)
@@ -62,6 +62,7 @@ tm_to_string (struct tm t)
 
 int
 main (int argc, char* argv[])
+try
 {
        optional<boost::filesystem::path> private_key_file;
 
@@ -144,3 +145,8 @@ main (int argc, char* argv[])
 
        return 0;
 }
+catch (std::exception& e)
+{
+       cerr << "Error: " << e.what() << "\n";
+       exit (EXIT_FAILURE);
+}