
// Auto-generated file -- do not edit

#ifndef AUTOGEN_RAIDFILEEXCEPTION_H
#define AUTOGEN_RAIDFILEEXCEPTION_H

#include "BoxException.h"

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

	enum
	{
		Internal = 0,
		CantOpenConfigFile = 1,
		BadConfigFile = 2,
		NoSuchDiscSet = 3,
		CannotOverwriteExistingFile = 4,
		AlreadyOpen = 5,
		ErrorOpeningWriteFile = 6,
		NotOpen = 7,
		OSError = 8,
		WriteFileOpenOnTransform = 9,
		WrongNumberOfDiscsInSet = 10,
		RaidFileDoesntExist = 11,
		ErrorOpeningFileForRead = 12,
		FileIsDamagedNotRecoverable = 13,
		InvalidRaidFile = 14,
		DirectoryIncomplete = 15,
		UnexpectedFileInDirPlace = 16,
		FileExistsInDirectoryCreation = 17,
		UnsupportedReadWriteOrClose = 18,
		CanOnlyGetUsageBeforeCommit = 19,
		CanOnlyGetFileSizeBeforeCommit = 20,
		ErrorOpeningWriteFileOnTruncate = 21,
		FileIsCurrentlyOpenForWriting = 22,
		RequestedModifyUnreferencedFile = 23,
		RequestedModifyMultiplyReferencedFile = 24,
		RequestedDeleteReferencedFile = 25
	};
	
	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_RAIDFILEEXCEPTION_H
