From 3473cc68f59911cb6659634fdc577f882c8128de Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 15 Sep 2016 17:06:24 +0300 Subject: Add io_error alias for std::ios_base::failure --- build2/cc/compile.cxx | 6 +++--- build2/cc/gcc.cxx | 2 +- build2/cc/link.cxx | 4 ++-- build2/cc/msvc.cxx | 2 +- build2/cc/windows-manifest.cxx | 4 ++-- build2/cc/windows-rpath.cxx | 2 +- 6 files changed, 10 insertions(+), 10 deletions(-) (limited to 'build2/cc') 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 (); } -- cgit v1.1