
// Auto-generated file -- do not edit

#include "Box.h"
#include "autogen_HTTPException.h"

#include "MemLeakFindOn.h"

#ifdef EXCEPTION_CODENAMES_EXTENDED
	#ifdef EXCEPTION_CODENAMES_EXTENDED_WITH_DESCRIPTION
static const char *whats[] = {
	"HTTP Internal",
	"HTTP RequestReadFailed",
	"HTTP RequestAlreadyBeenRead",
	"HTTP BadRequest",
	"HTTP UnknownResponseCodeUsed",
	"HTTP NoContentTypeSet",
	"HTTP POSTContentTooLong",
	"HTTP CannotSetRedirectIfReponseHasData",
	"HTTP CannotSetNotFoundIfReponseHasData",
	"HTTP NotImplemented",
	"HTTP RequestNotInitialised",
	"HTTP BadResponse",
	"HTTP ResponseReadFailed",
	"HTTP NoStreamConfigured"
};
	#else
static const char *whats[] = {
	"HTTP Internal",
	"HTTP RequestReadFailed",
	"HTTP RequestAlreadyBeenRead",
	"HTTP BadRequest",
	"HTTP UnknownResponseCodeUsed",
	"HTTP NoContentTypeSet",
	"HTTP POSTContentTooLong",
	"HTTP CannotSetRedirectIfReponseHasData",
	"HTTP CannotSetNotFoundIfReponseHasData",
	"HTTP NotImplemented",
	"HTTP RequestNotInitialised",
	"HTTP BadResponse",
	"HTTP ResponseReadFailed",
	"HTTP NoStreamConfigured"
};
	#endif
#endif

unsigned int HTTPException::GetType() const throw()
{
	return HTTPException::ExceptionType;
}

unsigned int HTTPException::GetSubType() const throw()
{
	return mSubType;
}

const char *HTTPException::what() const throw()
{
#ifdef EXCEPTION_CODENAMES_EXTENDED
	if(mSubType < 0 || mSubType > (sizeof(whats) / sizeof(whats[0])))
	{
		return "HTTP";
	}
	return whats[mSubType];
#else
	return "HTTP";
#endif
}

