From dbb56f2986eefd0ffb1350ab1ff0cb47ad5e7918 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Wed, 21 Jul 2021 21:27:07 +0300 Subject: Add --no-private-config option for pkg-build and --no-{host,build2}-config options for cfg-create --- bpkg/bpkg.cxx | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'bpkg/bpkg.cxx') diff --git a/bpkg/bpkg.cxx b/bpkg/bpkg.cxx index 12c44ad..0fc1dbe 100644 --- a/bpkg/bpkg.cxx +++ b/bpkg/bpkg.cxx @@ -554,16 +554,9 @@ try assert (false); fail << "unhandled command"; } - // Derived from failed and so needs to be caught first. - // - catch (const recoverable&) + catch (const failed& e) { - r = 2; - break; - } - catch (const failed&) - { - r = 1; + r = e.code; break; } @@ -585,22 +578,22 @@ try return 0; } -catch (const failed&) +catch (const failed& e) { - return 1; // Diagnostics has already been issued. + return e.code; // Diagnostics has already been issued. } catch (const cli::exception& e) { error << e; return 1; } -/* +#if 0 catch (const std::exception& e) { error << e; return 1; } -*/ +#endif int main (int argc, char* argv[]) -- cgit v1.1