From 9a81c308f2d4217592630ef41a18a8998bd66f5c Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Fri, 6 Jan 2017 03:26:03 +0300 Subject: Add operator<<(ostream, exception) --- tests/dir-iterator/driver.cxx | 3 ++- tests/link/driver.cxx | 2 +- tests/manifest-parser/driver.cxx | 2 +- tests/manifest-roundtrip/driver.cxx | 3 ++- tests/manifest-serializer/driver.cxx | 2 +- tests/process/driver.cxx | 2 +- tests/target-triplet/driver.cxx | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/dir-iterator/driver.cxx b/tests/dir-iterator/driver.cxx index 62f051b..d3d25b8 100644 --- a/tests/dir-iterator/driver.cxx +++ b/tests/dir-iterator/driver.cxx @@ -8,6 +8,7 @@ #include #include +#include // operator<<(ostream, exception) #include using namespace std; @@ -62,7 +63,7 @@ main (int argc, const char* argv[]) } catch (const exception& e) { - cerr << argv[1] << ": " << e.what () << endl; + cerr << argv[1] << ": " << e << endl; return 1; } } diff --git a/tests/link/driver.cxx b/tests/link/driver.cxx index 3171af0..3cade44 100644 --- a/tests/link/driver.cxx +++ b/tests/link/driver.cxx @@ -57,7 +57,7 @@ link_dir (const dir_path& target, } catch (const system_error& e) { - //cerr << e.what () << endl; + //cerr << e << endl; return false; } diff --git a/tests/manifest-parser/driver.cxx b/tests/manifest-parser/driver.cxx index 1068570..76d1579 100644 --- a/tests/manifest-parser/driver.cxx +++ b/tests/manifest-parser/driver.cxx @@ -200,7 +200,7 @@ fail (const char* m) } catch (const manifest_parsing& e) { - //cerr << e.what () << endl; + //cerr << e << endl; } return true; diff --git a/tests/manifest-roundtrip/driver.cxx b/tests/manifest-roundtrip/driver.cxx index cb48e74..69fcf03 100644 --- a/tests/manifest-roundtrip/driver.cxx +++ b/tests/manifest-roundtrip/driver.cxx @@ -5,6 +5,7 @@ #include #include +#include // operator<<(ostream, exception) #include #include #include @@ -46,7 +47,7 @@ main (int argc, char* argv[]) } catch (const exception& e) { - cerr << e.what () << endl; + cerr << e << endl; return 1; } } diff --git a/tests/manifest-serializer/driver.cxx b/tests/manifest-serializer/driver.cxx index 310e34c..64434c9 100644 --- a/tests/manifest-serializer/driver.cxx +++ b/tests/manifest-serializer/driver.cxx @@ -238,7 +238,7 @@ fail (const pairs& m) } catch (const manifest_serialization& e) { - //cerr << e.what () << endl; + //cerr << e << endl; } return true; diff --git a/tests/process/driver.cxx b/tests/process/driver.cxx index cc806f2..1fb685c 100644 --- a/tests/process/driver.cxx +++ b/tests/process/driver.cxx @@ -146,7 +146,7 @@ exec (const path& p, if (e.child ()) exit (1); - //cerr << args[0] << ": " << e.what () << endl; + //cerr << args[0] << ": " << e << endl; return false; } } diff --git a/tests/target-triplet/driver.cxx b/tests/target-triplet/driver.cxx index fe055db..24cd02f 100644 --- a/tests/target-triplet/driver.cxx +++ b/tests/target-triplet/driver.cxx @@ -154,7 +154,7 @@ fail (const char* s) } catch (invalid_argument& e) { - //cerr << e.what () << endl; + //cerr << e << endl; } return true; -- cgit v1.1