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/compile.cxx | 3 +-- build2/cc/guess.cxx | 20 ++++++++------------ 2 files changed, 9 insertions(+), 14 deletions(-) (limited to 'build2/cc') diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx index 45a0aff..37cd7d7 100644 --- a/build2/cc/compile.cxx +++ b/build2/cc/compile.cxx @@ -703,8 +703,7 @@ namespace build2 } } - error << "unable to parse /showIncludes include error line"; - throw failed (); + fail << "unable to parse /showIncludes include error line" << endf; } else { 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