
// Auto-generated file -- do not edit

#include "Box.h"
#include "autogen_CommonException.h"

#include "MemLeakFindOn.h"

#ifdef EXCEPTION_CODENAMES_EXTENDED
	#ifdef EXCEPTION_CODENAMES_EXTENDED_WITH_DESCRIPTION
static const char *whats[] = {
	"Common Internal",
	"Common AssertFailed",
	"Common OSFileOpenError (Can't open a file -- attempted to load a non-existant config file or bad file referenced within?)",
	"Common OSFileCloseError",
	"Common FileAlreadyClosed",
	"Common BadArguments",
	"Common ConfigNoKey",
	"Common ConfigNoSubConfig",
	"Common GetLineNoHandle",
	"Common OSFileError (Error accessing a file. Check permissions.)",
	"Common GetLineEOF",
	"Common ConfigBadIntValue",
	"Common GetLineTooLarge (Protects against very large lines using up lots of memory.)",
	"Common NotSupported",
	"Common OSFileReadError",
	"Common OSFileWriteError",
	"Common FileClosed",
	"Common IOStreamBadSeekType",
	"Common CantWriteToPartialReadStream",
	"Common CollectInBufferStreamNotInCorrectPhase",
	"Common NamedLockAlreadyLockingSomething",
	"Common NamedLockNotHeld",
	"Common StreamableMemBlockIncompleteRead",
	"Common MemBlockStreamNotSupported",
	"Common StreamDoesntHaveRequiredProperty",
	"Common CannotWriteToReadGatherStream",
	"Common ReadGatherStreamAddingBadBlock",
	"Common CouldNotLookUpUsername",
	"Common CouldNotRestoreProcessUser",
	"Common CouldNotChangeProcessUser",
	"Common RegexNotSupportedOnThisPlatform (Your platform does not have built in regular expression libraries.)",
	"Common BadRegularExpression",
	"Common CouldNotCreateKQueue",
	"Common KEventErrorAdd",
	"Common KEventErrorWait",
	"Common KEventErrorRemove",
	"Common KQueueNotSupportedOnThisPlatform",
	"Common IOStreamGetLineNotEnoughDataToIgnore (Bad value passed to IOStreamGetLine::IgnoreBufferedData())",
	"Common TempDirPathTooLong (Your temporary directory path is too long. Check the TMP and TEMP environment variables.)",
	"Common ArchiveBlockIncompleteRead (The Store Object Info File is too short or corrupted, and will be rewritten automatically when the next backup completes.)",
	"Common AccessDenied (Access to the file or directory was denied. Please check the permissions.)"
};
	#else
static const char *whats[] = {
	"Common Internal",
	"Common AssertFailed",
	"Common OSFileOpenError",
	"Common OSFileCloseError",
	"Common FileAlreadyClosed",
	"Common BadArguments",
	"Common ConfigNoKey",
	"Common ConfigNoSubConfig",
	"Common GetLineNoHandle",
	"Common OSFileError",
	"Common GetLineEOF",
	"Common ConfigBadIntValue",
	"Common GetLineTooLarge",
	"Common NotSupported",
	"Common OSFileReadError",
	"Common OSFileWriteError",
	"Common FileClosed",
	"Common IOStreamBadSeekType",
	"Common CantWriteToPartialReadStream",
	"Common CollectInBufferStreamNotInCorrectPhase",
	"Common NamedLockAlreadyLockingSomething",
	"Common NamedLockNotHeld",
	"Common StreamableMemBlockIncompleteRead",
	"Common MemBlockStreamNotSupported",
	"Common StreamDoesntHaveRequiredProperty",
	"Common CannotWriteToReadGatherStream",
	"Common ReadGatherStreamAddingBadBlock",
	"Common CouldNotLookUpUsername",
	"Common CouldNotRestoreProcessUser",
	"Common CouldNotChangeProcessUser",
	"Common RegexNotSupportedOnThisPlatform",
	"Common BadRegularExpression",
	"Common CouldNotCreateKQueue",
	"Common KEventErrorAdd",
	"Common KEventErrorWait",
	"Common KEventErrorRemove",
	"Common KQueueNotSupportedOnThisPlatform",
	"Common IOStreamGetLineNotEnoughDataToIgnore",
	"Common TempDirPathTooLong",
	"Common ArchiveBlockIncompleteRead",
	"Common AccessDenied"
};
	#endif
#endif

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

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

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

