From 9e2b4fd3bbc0c61bf6c84540c52869ec7d830718 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 6 Jan 2017 03:24:33 +0300 Subject: Make use of operator<<(ostream, exception) --- build2/utility.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'build2/utility.cxx') diff --git a/build2/utility.cxx b/build2/utility.cxx index cf7e867..76d3367 100644 --- a/build2/utility.cxx +++ b/build2/utility.cxx @@ -160,7 +160,7 @@ namespace build2 } catch (const process_error& e) { - fail << "unable to execute " << args0 << ": " << e.what () << endf; + fail << "unable to execute " << args0 << ": " << e << endf; } process_path @@ -171,7 +171,7 @@ namespace build2 } catch (const process_error& e) { - fail << "unable to execute " << f << ": " << e.what () << endf; + fail << "unable to execute " << f << ": " << e << endf; } process @@ -192,11 +192,11 @@ namespace build2 { // Note: run_finish() expects this exact message. // - cerr << "unable to execute " << args[0] << ": " << e.what () << endl; + cerr << "unable to execute " << args[0] << ": " << e << endl; exit (1); } else - fail << "unable to execute " << args[0] << ": " << e.what () << endf; + fail << "unable to execute " << args[0] << ": " << e << endf; } } @@ -225,7 +225,7 @@ namespace build2 } catch (const process_error& e) { - fail << "unable to execute " << args[0] << ": " << e.what () << endf; + fail << "unable to execute " << args[0] << ": " << e << endf; } const string empty_string; -- cgit v1.1