aboutsummaryrefslogtreecommitdiff
path: root/build2/cc
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-09-15 17:06:24 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-09-15 17:15:26 +0300
commit3473cc68f59911cb6659634fdc577f882c8128de (patch)
treea49450c846bf4ac8ae6159f35f36406cfe58221a /build2/cc
parent0ce6a95f5fca35888632551181e2c3756e38942c (diff)
Add io_error alias for std::ios_base::failure
Diffstat (limited to 'build2/cc')
-rw-r--r--build2/cc/compile.cxx6
-rw-r--r--build2/cc/gcc.cxx2
-rw-r--r--build2/cc/link.cxx4
-rw-r--r--build2/cc/msvc.cxx2
-rw-r--r--build2/cc/windows-manifest.cxx4
-rw-r--r--build2/cc/windows-rpath.cxx2
6 files changed, 10 insertions, 10 deletions
diff --git a/build2/cc/compile.cxx b/build2/cc/compile.cxx
index 2dc2a28..6587d8c 100644
--- a/build2/cc/compile.cxx
+++ b/build2/cc/compile.cxx
@@ -1201,7 +1201,7 @@ namespace build2
if (is.eof ()) // Trailing newline.
break;
- throw ifdstream::failure ("");
+ throw io_error ("");
}
l6 ([&]{trace << "header dependency line '" << l << "'";});
@@ -1349,7 +1349,7 @@ namespace build2
fail << "expected error exist status from " << x_lang
<< " compiler";
}
- catch (const ifdstream::failure&)
+ catch (const io_error&)
{
pr.wait ();
fail << "unable to read " << x_lang << " compiler header "
@@ -1567,7 +1567,7 @@ namespace build2
is.close ();
}
- catch (const ifdstream::failure&) {} // Assume exits with error.
+ catch (const io_error&) {} // Assume exits with error.
}
if (!pr.wait ())
diff --git a/build2/cc/gcc.cxx b/build2/cc/gcc.cxx
index 4c115b4..a5c8357 100644
--- a/build2/cc/gcc.cxx
+++ b/build2/cc/gcc.cxx
@@ -80,7 +80,7 @@ namespace build2
if (!pr.wait ())
throw failed ();
}
- catch (const ifdstream::failure&)
+ catch (const io_error&)
{
pr.wait ();
fail << "error reading " << x_lang << " compiler -print-search-dirs "
diff --git a/build2/cc/link.cxx b/build2/cc/link.cxx
index d36e5e1..5ab9d91 100644
--- a/build2/cc/link.cxx
+++ b/build2/cc/link.cxx
@@ -974,7 +974,7 @@ namespace build2
if (!pr.wait ())
throw failed (); // Assume diagnostics issued.
}
- catch (const ofdstream::failure& e)
+ catch (const io_error& e)
{
if (pr.wait ()) // Ignore if child failed.
fail << "unable to pipe resource file to " << args[0]
@@ -1489,7 +1489,7 @@ namespace build2
is.close ();
}
- catch (const ifdstream::failure&) {} // Assume exits with error.
+ catch (const io_error&) {} // Assume exits with error.
}
if (!pr.wait ())
diff --git a/build2/cc/msvc.cxx b/build2/cc/msvc.cxx
index 80beb09..5261072 100644
--- a/build2/cc/msvc.cxx
+++ b/build2/cc/msvc.cxx
@@ -192,7 +192,7 @@ namespace build2
}
}
}
- catch (const ifdstream::failure&)
+ catch (const io_error&)
{
// Presumably the child process failed. Let run_finish() deal with
// that.
diff --git a/build2/cc/windows-manifest.cxx b/build2/cc/windows-manifest.cxx
index a3e87fe..da0aaf1 100644
--- a/build2/cc/windows-manifest.cxx
+++ b/build2/cc/windows-manifest.cxx
@@ -110,7 +110,7 @@ namespace build2
if (s == m)
return mf;
}
- catch (const ifdstream::failure&)
+ catch (const io_error&)
{
// Whatever the reason we failed for , let's rewrite the file.
}
@@ -125,7 +125,7 @@ namespace build2
ofs << m;
ofs.close ();
}
- catch (const ofdstream::failure& e)
+ catch (const io_error& e)
{
fail << "unable to write to " << m << ": " << e.what ();
}
diff --git a/build2/cc/windows-rpath.cxx b/build2/cc/windows-rpath.cxx
index 1bef95c..5c70ff9 100644
--- a/build2/cc/windows-rpath.cxx
+++ b/build2/cc/windows-rpath.cxx
@@ -369,7 +369,7 @@ namespace build2
ofs.close ();
}
- catch (const ofdstream::failure& e)
+ catch (const io_error& e)
{
fail << "unable to write to " << am << ": " << e.what ();
}