
// Auto-generated file -- do not edit

#ifndef AUTOGEN_HTTPEXCEPTION_H
#define AUTOGEN_HTTPEXCEPTION_H

#include "BoxException.h"

// --------------------------------------------------------------------------
//
// Class
//		Name:    HTTPException
//		Purpose: Exception
//		Created: autogen
//
// --------------------------------------------------------------------------
class HTTPException : public BoxException
{
public:
	HTTPException(unsigned int SubType,
		const std::string& rMessage = "")
	: mSubType(SubType), mMessage(rMessage)
	{
	}
	
	HTTPException(const HTTPException &rToCopy)
	: mSubType(rToCopy.mSubType), mMessage(rToCopy.mMessage)
	{
	}
	
	~HTTPException() throw ()
	{
	}
	
	enum
	{
		ExceptionType = 10
	};

	enum
	{
		Internal = 0,
		RequestReadFailed = 1,
		RequestAlreadyBeenRead = 2,
		BadRequest = 3,
		UnknownResponseCodeUsed = 4,
		NoContentTypeSet = 5,
		POSTContentTooLong = 6,
		CannotSetRedirectIfReponseHasData = 7,
		CannotSetNotFoundIfReponseHasData = 8,
		NotImplemented = 9,
		RequestNotInitialised = 10,
		BadResponse = 11,
		ResponseReadFailed = 12,
		NoStreamConfigured = 13
	};
	
	virtual unsigned int GetType() const throw();
	virtual unsigned int GetSubType() const throw();
	virtual const char *what() const throw();
	virtual const std::string& GetMessage() const
	{
		return mMessage;
	}

private:
	unsigned int mSubType;
	std::string mMessage;
};

#endif // AUTOGEN_HTTPEXCEPTION_H
