imgtools/romtools/rofsbuild/inc/cache/cacheexception.hpp
author andy simpson <andrews@symbian.org>
Fri, 30 Jul 2010 15:14:33 +0100
changeset 622 c26070468a42
parent 600 6d08f4a05d93
permissions -rw-r--r--
Add export for s60ibymacros.pm (re-applies missing part of fix for Bug 2901

/**
 * @file cacheexception.hpp
 */


#ifndef ROM_TOOLS_ROFSBUILD_CACHE_CACHEEXCEPTION_H_
#define ROM_TOOLS_ROFSBUILD_CACHE_CACHEEXCEPTION_H_


/**
 * @class CacheException
 * @brief Encapsulates all possible failures happening inside cache.
 */
class CacheException
{
public:
	/**
	 * @fn CacheException::CacheException(int ErrorCode)
	 * @brief Constructor
	 * @param ErrorCode The error code, must be one of the static constants.
	 */
	CacheException(int ErrorCode);

	/**
	 * @fn int CacheException::GetErrorCode(void)
	 * @brief Retrieve integer error number.
	 * @reurn The error code.
	 */
	int GetErrorCode(void);

	/**
	 * @fn const char* CacheException::GetErrorMessage(void)
	 * @brief Retrieve text error message.
	 * @return The error message.
	 */
	const char* GetErrorMessage(void);

	virtual ~CacheException(void);

	static int EPOCROOT_NOT_FOUND         ;
	static int RESOURCE_ALLOCATION_FAILURE;
	static int CACHE_NOT_FOUND            ;
	static int CACHE_INVALID              ;
	static int CACHE_IS_EMPTY             ;
	static int HARDDRIVE_FAILURE          ;
protected:
	int errcode;
private:
	CacheException(void);

	CacheException& operator = (const CacheException&);
};


#endif  /* defined ROM_TOOLS_ROFSBUILD_CACHE_CACHEEXCEPTION_H_ */