
// Auto-generated file -- do not edit

#include "Box.h"
#include "autogen_RaidFileException.h"

#include "MemLeakFindOn.h"

#ifdef EXCEPTION_CODENAMES_EXTENDED
	#ifdef EXCEPTION_CODENAMES_EXTENDED_WITH_DESCRIPTION
static const char *whats[] = {
	"RaidFile Internal",
	"RaidFile CantOpenConfigFile (The raidfile.conf file is not accessible. Check that it is present in the default location or daemon configuration files point to the correct location.)",
	"RaidFile BadConfigFile",
	"RaidFile NoSuchDiscSet",
	"RaidFile CannotOverwriteExistingFile",
	"RaidFile AlreadyOpen",
	"RaidFile ErrorOpeningWriteFile",
	"RaidFile NotOpen",
	"RaidFile OSError (Error when accessing an underlying file. Check file permissions allow files to be read and written in the configured raid directories.)",
	"RaidFile WriteFileOpenOnTransform",
	"RaidFile WrongNumberOfDiscsInSet (There should be three directories in each disc set.)",
	"RaidFile RaidFileDoesntExist (Error when accessing a file on the store. Check the store with bbstoreaccounts check.)",
	"RaidFile ErrorOpeningFileForRead",
	"RaidFile FileIsDamagedNotRecoverable",
	"RaidFile InvalidRaidFile",
	"RaidFile DirectoryIncomplete",
	"RaidFile UnexpectedFileInDirPlace",
	"RaidFile FileExistsInDirectoryCreation",
	"RaidFile UnsupportedReadWriteOrClose",
	"RaidFile CanOnlyGetUsageBeforeCommit",
	"RaidFile CanOnlyGetFileSizeBeforeCommit",
	"RaidFile ErrorOpeningWriteFileOnTruncate",
	"RaidFile FileIsCurrentlyOpenForWriting",
	"RaidFile RequestedModifyUnreferencedFile (Internal error: the server attempted to modify a file which has no references.)",
	"RaidFile RequestedModifyMultiplyReferencedFile (Internal error: the server attempted to modify a file which has multiple references.)",
	"RaidFile RequestedDeleteReferencedFile (Internal error: the server attempted to delete a file which is still referenced.)"
};
	#else
static const char *whats[] = {
	"RaidFile Internal",
	"RaidFile CantOpenConfigFile",
	"RaidFile BadConfigFile",
	"RaidFile NoSuchDiscSet",
	"RaidFile CannotOverwriteExistingFile",
	"RaidFile AlreadyOpen",
	"RaidFile ErrorOpeningWriteFile",
	"RaidFile NotOpen",
	"RaidFile OSError",
	"RaidFile WriteFileOpenOnTransform",
	"RaidFile WrongNumberOfDiscsInSet",
	"RaidFile RaidFileDoesntExist",
	"RaidFile ErrorOpeningFileForRead",
	"RaidFile FileIsDamagedNotRecoverable",
	"RaidFile InvalidRaidFile",
	"RaidFile DirectoryIncomplete",
	"RaidFile UnexpectedFileInDirPlace",
	"RaidFile FileExistsInDirectoryCreation",
	"RaidFile UnsupportedReadWriteOrClose",
	"RaidFile CanOnlyGetUsageBeforeCommit",
	"RaidFile CanOnlyGetFileSizeBeforeCommit",
	"RaidFile ErrorOpeningWriteFileOnTruncate",
	"RaidFile FileIsCurrentlyOpenForWriting",
	"RaidFile RequestedModifyUnreferencedFile",
	"RaidFile RequestedModifyMultiplyReferencedFile",
	"RaidFile RequestedDeleteReferencedFile"
};
	#endif
#endif

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

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

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

