X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmessage.cpp;h=c9638d0a05b3d938e0cb6b876df59fa80686e901;hb=7b84e8b9d560e868f7fafbc18a2770579ee1b4b3;hp=f1e4c286bd13031c1918d21cebacec189200223c;hpb=c3bc44e20b80683ec1e8296a449804ff6c5f7aff;p=libs%2Fnet.git diff --git a/source/message.cpp b/source/message.cpp index f1e4c28..c9638d0 100644 --- a/source/message.cpp +++ b/source/message.cpp @@ -105,13 +105,13 @@ unsigned Message::parse_headers(const string &d) { unsigned lf = d.find('\n', start); if(lf==string::npos) - throw InvalidParameterValue("Incomplete response"); + throw invalid_argument("Message::parse_headers"); if(lf==start || (d[start]=='\r' && lf==start+1)) return lf+1; unsigned colon = d.find(':', start); if(colon>lf) - throw InvalidParameterValue("No colon in header"); + throw invalid_argument("Message::parse_headers"); set_header(d.substr(start, colon-start), strip(d.substr(colon+1, lf-colon-1)));