aboutsummaryrefslogtreecommitdiff
path: root/build2/cc
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2017-01-06 03:24:33 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2017-01-09 21:44:22 +0300
commit9e2b4fd3bbc0c61bf6c84540c52869ec7d830718 (patch)
tree550c9edd5b29b164d7c8c2ac13111a9491495022 /build2/cc
parentc5d118cde064c09a416541a7f7e76d354552b2fd (diff)
Make use of operator<<(ostream, exception)
Diffstat (limited to 'build2/cc')
-rw-r--r--build2/cc/compile.cxx4
-rw-r--r--build2/cc/gcc.cxx2
-rw-r--r--build2/cc/link.cxx10
-rw-r--r--build2/cc/module.cxx2
-rw-r--r--build2/cc/windows-manifest.cxx2
-rw-r--r--build2/cc/windows-rpath.cxx8
6 files changed, 14 insertions, 14 deletions
diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx
index 1b34c69..6fd64c2 100644
--- a/build2/cc/compile.cxx
+++ b/build2/cc/compile.cxx
@@ -1370,7 +1370,7 @@ namespace build2
}
catch (const process_error& e)
{
- error << "unable to execute " << args[0] << ": " << e.what ();
+ error << "unable to execute " << args[0] << ": " << e;
// In a multi-threaded program that fork()'ed but did not exec(),
// it is unwise to try to do any kind of cleanup (like unwinding
@@ -1596,7 +1596,7 @@ namespace build2
}
catch (const process_error& e)
{
- error << "unable to execute " << args[0] << ": " << e.what ();
+ error << "unable to execute " << args[0] << ": " << e;
// In a multi-threaded program that fork()'ed but did not exec(),
// it is unwise to try to do any kind of cleanup (like unwinding
diff --git a/build2/cc/gcc.cxx b/build2/cc/gcc.cxx
index c778493..6ad1ad1 100644
--- a/build2/cc/gcc.cxx
+++ b/build2/cc/gcc.cxx
@@ -90,7 +90,7 @@ namespace build2
}
catch (const process_error& e)
{
- error << "unable to execute " << args[0] << ": " << e.what ();
+ error << "unable to execute " << args[0] << ": " << e;
if (e.child ())
exit (1);
diff --git a/build2/cc/link.cxx b/build2/cc/link.cxx
index f55013f..9dbfa36 100644
--- a/build2/cc/link.cxx
+++ b/build2/cc/link.cxx
@@ -978,12 +978,12 @@ namespace build2
{
if (pr.wait ()) // Ignore if child failed.
fail << "unable to pipe resource file to " << args[0]
- << ": " << e.what ();
+ << ": " << e;
}
}
catch (const process_error& e)
{
- error << "unable to execute " << args[0] << ": " << e.what ();
+ error << "unable to execute " << args[0] << ": " << e;
if (e.child ())
exit (1);
@@ -1498,7 +1498,7 @@ namespace build2
}
catch (const process_error& e)
{
- error << "unable to execute " << args[0] << ": " << e.what ();
+ error << "unable to execute " << args[0] << ": " << e;
// In a multi-threaded program that fork()'ed but did not exec(),
// it is unwise to try to do any kind of cleanup (like unwinding
@@ -1536,7 +1536,7 @@ namespace build2
}
catch (const process_error& e)
{
- error << "unable to execute " << args[0] << ": " << e.what ();
+ error << "unable to execute " << args[0] << ": " << e;
if (e.child ())
exit (1);
@@ -1577,7 +1577,7 @@ namespace build2
}
catch (const system_error& e)
{
- fail << "unable to create symlink " << l << ": " << e.what ();
+ fail << "unable to create symlink " << l << ": " << e;
}
};
diff --git a/build2/cc/module.cxx b/build2/cc/module.cxx
index 067aea3..40bd454 100644
--- a/build2/cc/module.cxx
+++ b/build2/cc/module.cxx
@@ -115,7 +115,7 @@ namespace build2
// help us out.
//
fail << "unable to parse " << x_lang << " compiler target '"
- << ci.target << "': " << e.what () <<
+ << ci.target << "': " << e <<
info << "consider using the --config-sub option";
}
}
diff --git a/build2/cc/windows-manifest.cxx b/build2/cc/windows-manifest.cxx
index c4e86e4..44d8f7b 100644
--- a/build2/cc/windows-manifest.cxx
+++ b/build2/cc/windows-manifest.cxx
@@ -127,7 +127,7 @@ namespace build2
}
catch (const io_error& e)
{
- fail << "unable to write to " << m << ": " << e.what ();
+ fail << "unable to write to " << m << ": " << e;
}
return mf;
diff --git a/build2/cc/windows-rpath.cxx b/build2/cc/windows-rpath.cxx
index aa1d740..35d83cc 100644
--- a/build2/cc/windows-rpath.cxx
+++ b/build2/cc/windows-rpath.cxx
@@ -311,7 +311,7 @@ namespace build2
if (c != EPERM && c != ENOSYS)
{
print ("ln -s");
- fail << "unable to create symlink " << l << ": " << e.what ();
+ fail << "unable to create symlink " << l << ": " << e;
}
try
@@ -326,7 +326,7 @@ namespace build2
if (c != EPERM && c != ENOSYS)
{
print ("ln");
- fail << "unable to create hardlink " << l << ": " << e.what ();
+ fail << "unable to create hardlink " << l << ": " << e;
}
try
@@ -337,7 +337,7 @@ namespace build2
catch (const system_error& e)
{
print ("cp");
- fail << "unable to create copy " << l << ": " << e.what ();
+ fail << "unable to create copy " << l << ": " << e;
}
}
}
@@ -371,7 +371,7 @@ namespace build2
}
catch (const io_error& e)
{
- fail << "unable to write to " << am << ": " << e.what ();
+ fail << "unable to write to " << am << ": " << e;
}
}
}