]> git.tdb.fi Git - libs/net.git/blobdiff - source/version.cpp
Use maputils.h
[libs/net.git] / source / version.cpp
index 76159bae8cde30d01473036671fe596dcfd909f9..f22b46eafe92523497d25403c3c772fd1fe46676 100644 (file)
@@ -1,10 +1,3 @@
-/* $Id$
-
-This file is part of libmsphttp
-Copyright © 2008  Mikkosoft Productions, Mikko Rasa
-Distributed under the LGPL
-*/
-
 #include <msp/strings/formatter.h>
 #include <msp/strings/lexicalcast.h>
 #include <msp/strings/regex.h>
@@ -20,7 +13,7 @@ Version parse_version(const std::string &ver)
        if(RegMatch match = Regex("^HTTP/([0-9]+).([0-9]+)$").match(ver))
                return lexical_cast<unsigned>(match[1].str)<<4 | lexical_cast<unsigned>(match[2].str);
        else
-               throw InvalidParameterValue("Invalid HTTP version");
+               throw invalid_argument("parse_version");
 }
 
 string version_str(Version ver)