imgtools/romtools/rofsbuild/inc/cache/cacheexception.hpp
author Ross Qin <ross.qin@nokia.com>
Tue, 02 Nov 2010 09:31:04 +0800
changeset 671 ff8ff850b0cf
parent 600 6d08f4a05d93
permissions -rw-r--r--
fix the Serious problem with ROFS on-disk format
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
600
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     1
/**
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     2
 * @file cacheexception.hpp
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     3
 */
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     4
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     5
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     6
#ifndef ROM_TOOLS_ROFSBUILD_CACHE_CACHEEXCEPTION_H_
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     7
#define ROM_TOOLS_ROFSBUILD_CACHE_CACHEEXCEPTION_H_
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     8
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
     9
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    10
/**
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    11
 * @class CacheException
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    12
 * @brief Encapsulates all possible failures happening inside cache.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    13
 */
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    14
class CacheException
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    15
{
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    16
public:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    17
	/**
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    18
	 * @fn CacheException::CacheException(int ErrorCode)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    19
	 * @brief Constructor
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    20
	 * @param ErrorCode The error code, must be one of the static constants.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    21
	 */
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    22
	CacheException(int ErrorCode);
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    23
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    24
	/**
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    25
	 * @fn int CacheException::GetErrorCode(void)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    26
	 * @brief Retrieve integer error number.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    27
	 * @reurn The error code.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    28
	 */
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    29
	int GetErrorCode(void);
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    30
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    31
	/**
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    32
	 * @fn const char* CacheException::GetErrorMessage(void)
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    33
	 * @brief Retrieve text error message.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    34
	 * @return The error message.
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    35
	 */
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    36
	const char* GetErrorMessage(void);
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    37
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    38
	virtual ~CacheException(void);
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    39
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    40
	static int EPOCROOT_NOT_FOUND         ;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    41
	static int RESOURCE_ALLOCATION_FAILURE;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    42
	static int CACHE_NOT_FOUND            ;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    43
	static int CACHE_INVALID              ;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    44
	static int CACHE_IS_EMPTY             ;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    45
	static int HARDDRIVE_FAILURE          ;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    46
protected:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    47
	int errcode;
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    48
private:
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    49
	CacheException(void);
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    50
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    51
	CacheException& operator = (const CacheException&);
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    52
};
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    53
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    54
6d08f4a05d93 add deprecated files
jjkang
parents:
diff changeset
    55
#endif  /* defined ROM_TOOLS_ROFSBUILD_CACHE_CACHEEXCEPTION_H_ */