X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fversion.cpp;h=f22b46eafe92523497d25403c3c772fd1fe46676;hb=7b84e8b9d560e868f7fafbc18a2770579ee1b4b3;hp=2966fe8495ab04d6dbb0a03e6a859c2a27a5886d;hpb=a4049d7c4126126ca3abd12b1aca8715e7006d44;p=libs%2Fnet.git diff --git a/source/version.cpp b/source/version.cpp index 2966fe8..f22b46e 100644 --- a/source/version.cpp +++ b/source/version.cpp @@ -1,10 +1,3 @@ -/* $Id$ - -This file is part of libmsphttp -Copyright © 2008 Mikkosoft Productions, Mikko Rasa -Distributed under the LGPL -*/ - #include #include #include @@ -17,10 +10,10 @@ namespace Http { Version parse_version(const std::string &ver) { - if(RegMatch match=Regex("^HTTP/([0-9]+).([0-9]+)$").match(ver)) + if(RegMatch match = Regex("^HTTP/([0-9]+).([0-9]+)$").match(ver)) return lexical_cast(match[1].str)<<4 | lexical_cast(match[2].str); else - throw InvalidParameterValue("Invalid HTTP version"); + throw invalid_argument("parse_version"); } string version_str(Version ver)