aboutsummaryrefslogtreecommitdiff
path: root/build2/parser.cxx
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/parser.cxx
parentc5d118cde064c09a416541a7f7e76d354552b2fd (diff)
Make use of operator<<(ostream, exception)
Diffstat (limited to 'build2/parser.cxx')
-rw-r--r--build2/parser.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/build2/parser.cxx b/build2/parser.cxx
index d01b6fe..57a5618 100644
--- a/build2/parser.cxx
+++ b/build2/parser.cxx
@@ -820,7 +820,7 @@ namespace build2
}
catch (const io_error& e)
{
- fail (l) << "unable to read buildfile " << p << ": " << e.what ();
+ fail (l) << "unable to read buildfile " << p << ": " << e;
}
}
@@ -956,7 +956,7 @@ namespace build2
}
catch (const io_error& e)
{
- fail (l) << "unable to read buildfile " << p << ": " << e.what ();
+ fail (l) << "unable to read buildfile " << p << ": " << e;
}
scope_ = ocs;
@@ -1214,7 +1214,7 @@ namespace build2
try {iv = to_version (v);}
catch (const invalid_argument& e)
{
- fail (l) << "invalid version '" << v << "': " << e.what () << endf;
+ fail (l) << "invalid version '" << v << "': " << e << endf;
}
if (iv > BUILD2_VERSION)
@@ -1329,7 +1329,7 @@ namespace build2
take = (k.back () == '!' ? !e : e);
}
- catch (const invalid_argument& e) { fail (l) << e.what (); }
+ catch (const invalid_argument& e) { fail (l) << e; }
}
}
else
@@ -1433,7 +1433,7 @@ namespace build2
return;
}
}
- catch (const invalid_argument& e) { fail (el) << e.what (); }
+ catch (const invalid_argument& e) { fail (el) << e; }
// Being here means things didn't end up well. Parse the description, if
// any, with expansion. Then fail.
@@ -1798,7 +1798,7 @@ namespace build2
{
q = pp ? true : convert<bool> (move (lhs));
}
- catch (const invalid_argument& e) { fail (l) << e.what () << endf; }
+ catch (const invalid_argument& e) { fail (l) << e << endf; }
if (!pp)
pre_parse_ = !q; // Short-circuit middle?
@@ -1852,7 +1852,7 @@ namespace build2
//
lhs = convert<bool> (move (rhs));
}
- catch (const invalid_argument& e) { fail (l) << e.what (); }
+ catch (const invalid_argument& e) { fail (l) << e; }
}
pre_parse_ = pp;
@@ -1892,7 +1892,7 @@ namespace build2
//
lhs = convert<bool> (move (rhs));
}
- catch (const invalid_argument& e) { fail (l) << e.what (); }
+ catch (const invalid_argument& e) { fail (l) << e; }
}
pre_parse_ = pp;
@@ -2005,7 +2005,7 @@ namespace build2
//
v = !convert<bool> (move (v));
}
- catch (const invalid_argument& e) { fail (l) << e.what (); }
+ catch (const invalid_argument& e) { fail (l) << e; }
break;
}
default: