From add5c00b0b8a184c35473c20a65fa676525cf3f8 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 10 Aug 2011 21:41:09 +0300 Subject: [PATCH] One more exception change --- source/http/client.cpp | 3 +-- source/http/client.h | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) 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; -- 2.45.2