diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2018-09-20 13:02:04 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2018-09-20 13:02:04 +0300 |
commit | eb58dc7c9ec9877c645585b7fb163d2bcc251b5d (patch) | |
tree | 0427549af8c885be4afe41e43f373471d1ca8d90 | |
parent | 4a7f47960d97df4d45fe341e0c4732ed26958421 (diff) |
Fix bpkg to issue meaningful diagnostics if can't execute openssl
-rw-r--r-- | bpkg/auth.cxx | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/bpkg/auth.cxx b/bpkg/auth.cxx index 5db1860..af49f37 100644 --- a/bpkg/auth.cxx +++ b/bpkg/auth.cxx @@ -173,16 +173,13 @@ namespace bpkg // Fall through. } - // For old versions of g++ (as of 4.9) ios_base::failure is not derived - // from system_error. - // - catch (const io_error& e) + catch (const process_error& e) { - calc_failed (&e); + error << "unable to execute " << co.openssl () << ": " << e; // Fall through. } - catch (const system_error& e) + catch (const io_error& e) { calc_failed (&e); @@ -449,16 +446,13 @@ namespace bpkg // Fall through. } - // For old versions of g++ (as of 4.9) ios_base::failure is not derived - // from system_error. - // - catch (const io_error& e) + catch (const process_error& e) { - parse_failed (&e); + error << "unable to execute " << co.openssl () << ": " << e; // Fall through. } - catch (const system_error& e) + catch (const io_error& e) { parse_failed (&e); @@ -855,16 +849,13 @@ namespace bpkg // Fall through. } - // For old versions of g++ (as of 4.9) ios_base::failure is not derived - // from system_error. - // - catch (const io_error& e) + catch (const process_error& e) { - auth_failed (&e); + error << "unable to execute " << co.openssl () << ": " << e; // Fall through. } - catch (const system_error& e) + catch (const io_error& e) { auth_failed (&e); @@ -932,16 +923,13 @@ namespace bpkg // Fall through. } - // For old versions of g++ (as of 4.9) ios_base::failure is not derived - // from system_error. - // - catch (const io_error& e) + catch (const process_error& e) { - sign_failed (&e); + error << "unable to execute " << co.openssl () << ": " << e; // Fall through. } - catch (const system_error& e) + catch (const io_error& e) { sign_failed (&e); |