From: Mikko Rasa Date: Wed, 10 Aug 2011 18:41:09 +0000 (+0300) Subject: One more exception change X-Git-Url: http://git.tdb.fi/?p=libs%2Fnet.git;a=commitdiff_plain;h=add5c00b0b8a184c35473c20a65fa676525cf3f8 One more exception change --- diff --git a/source/http/client.cpp b/source/http/client.cpp index 0729544..3d14b04 100644 --- a/source/http/client.cpp +++ b/source/http/client.cpp @@ -1,4 +1,3 @@ -#include #include #include #include @@ -38,7 +37,7 @@ void Client::use_event_dispatcher(IO::EventDispatcher *ed) void Client::start_request(const Request &r) { if(request) - throw InvalidState("Already processing a request"); + throw client_busy(); string host = r.get_header("Host"); if(host.find(':')==string::npos) diff --git a/source/http/client.h b/source/http/client.h index ee10f8c..c8b154c 100644 --- a/source/http/client.h +++ b/source/http/client.h @@ -9,6 +9,13 @@ namespace Msp { namespace Http { +class client_busy: public std::logic_error +{ +public: + client_busy(): std::logic_error(std::string()) { } + virtual ~client_busy() throw() { } +}; + class Request; class Response;