From 557269660c1d9796a7cf9e911efb9262f645e359 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 22 Nov 2016 12:10:03 +0200 Subject: Use diagnostics facility from libbutl --- build2/cc/guess.cxx | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'build2/cc/guess.cxx') diff --git a/build2/cc/guess.cxx b/build2/cc/guess.cxx index f23a175..b153cc1 100644 --- a/build2/cc/guess.cxx +++ b/build2/cc/guess.cxx @@ -421,9 +421,8 @@ namespace build2 catch (const invalid_argument&) {} catch (const out_of_range&) {} - error << "unable to extract gcc " << m << " version from '" - << string (s, b, e - b) << "'"; - throw failed (); + fail << "unable to extract gcc " << m << " version from '" + << string (s, b, e - b) << "'" << endf; }; v.major = next ("major"); @@ -561,9 +560,8 @@ namespace build2 catch (const invalid_argument&) {} catch (const out_of_range&) {} - error << "unable to extract clang " << m << " version from '" - << string (s, b, e - b) << "'"; - throw failed (); + fail << "unable to extract clang " << m << " version from '" + << string (s, b, e - b) << "'" << endf; }; v.major = next ("major", false); @@ -718,9 +716,8 @@ namespace build2 catch (const invalid_argument&) {} catch (const out_of_range&) {} - error << "unable to extract icc " << m << " version from '" - << string (s, b, e - b) << "'"; - throw failed (); + fail << "unable to extract icc " << m << " version from '" + << string (s, b, e - b) << "'" << endf; }; v.major = next ("major", false); @@ -920,9 +917,8 @@ namespace build2 catch (const invalid_argument&) {} catch (const out_of_range&) {} - error << "unable to extract msvc " << m << " version from '" - << string (s, b, e - b) << "'"; - throw failed (); + fail << "unable to extract msvc " << m << " version from '" + << string (s, b, e - b) << "'" << endf; }; v.major = next ("major"); -- cgit v1.1