]> git.tdb.fi Git - libs/net.git/blobdiff - source/message.cpp
Exception changes
[libs/net.git] / source / message.cpp
index f1e4c286bd13031c1918d21cebacec189200223c..c9638d0a05b3d938e0cb6b876df59fa80686e901 100644 (file)
@@ -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)));