summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-10-11 10:36:42 +0100
committerCarl Hetherington <cth@carlh.net>2013-10-11 10:36:42 +0100
commit6c736757edebb8ee4c84284403b95dcf5cb59ece (patch)
tree7e6c47cfe9b954bb40cf32aaefeda44c85fdb9b3
parent9394dad74a8439f8230eb6aa21b639f3e10cbb2a (diff)
Improve error reporting from openssl calls.
-rw-r--r--src/signer_chain.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/signer_chain.cc b/src/signer_chain.cc
index 78a8f284..f538ce4f 100644
--- a/src/signer_chain.cc
+++ b/src/signer_chain.cc
@@ -35,16 +35,17 @@ using std::ifstream;
using std::stringstream;
using std::cout;
-static void command (string c)
+static void command (string cmd)
{
- int const r = system (c.c_str ());
+ int const r = system (cmd.c_str ());
#ifdef LIBDCP_WINDOWS
- if (r) {
+ int const code = r;
#else
- if (WEXITSTATUS (r)) {
-#endif
+ int const code = WEXITSTATUS (r);
+#endif
+ if (code) {
stringstream s;
- s << "error in " << c << "\n";
+ s << "error " << code << " in " << cmd << " within " << boost::filesystem::current_path();
throw libdcp::MiscError (s.str());
}
}