From 8749eeea8723196fa38a9eb7917775cfe8b87ad7 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 22 Nov 2016 12:09:27 +0200 Subject: Use diagnostics facility from libbutl --- bpkg/fetch.cxx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'bpkg/fetch.cxx') diff --git a/bpkg/fetch.cxx b/bpkg/fetch.cxx index 47f4f9b..4ad476b 100644 --- a/bpkg/fetch.cxx +++ b/bpkg/fetch.cxx @@ -632,9 +632,8 @@ namespace bpkg // While it is reasonable to assuming the child process issued // diagnostics, some may not mention the URL. // - error << "unable to fetch " << url << - info << "re-run with -v for more information"; - throw failed (); + fail << "unable to fetch " << url << + info << "re-run with -v for more information" << endf; } static path @@ -682,14 +681,12 @@ namespace bpkg } catch (const manifest_parsing& e) { - error (e.name, e.line, e.column) << e.description; + fail (e.name, e.line, e.column) << e.description << endf; } catch (const io_error& e) { - error << "unable to read from " << f << ": " << e.what (); + fail << "unable to read from " << f << ": " << e.what () << endf; } - - throw failed (); } static const path repositories ("repositories"); -- cgit v1.1