600
|
1 |
/**
|
|
2 |
* @file cacheexception.hpp
|
|
3 |
*/
|
|
4 |
|
|
5 |
|
|
6 |
#ifndef ROM_TOOLS_ROFSBUILD_CACHE_CACHEEXCEPTION_H_
|
|
7 |
#define ROM_TOOLS_ROFSBUILD_CACHE_CACHEEXCEPTION_H_
|
|
8 |
|
|
9 |
|
|
10 |
/**
|
|
11 |
* @class CacheException
|
|
12 |
* @brief Encapsulates all possible failures happening inside cache.
|
|
13 |
*/
|
|
14 |
class CacheException
|
|
15 |
{
|
|
16 |
public:
|
|
17 |
/**
|
|
18 |
* @fn CacheException::CacheException(int ErrorCode)
|
|
19 |
* @brief Constructor
|
|
20 |
* @param ErrorCode The error code, must be one of the static constants.
|
|
21 |
*/
|
|
22 |
CacheException(int ErrorCode);
|
|
23 |
|
|
24 |
/**
|
|
25 |
* @fn int CacheException::GetErrorCode(void)
|
|
26 |
* @brief Retrieve integer error number.
|
|
27 |
* @reurn The error code.
|
|
28 |
*/
|
|
29 |
int GetErrorCode(void);
|
|
30 |
|
|
31 |
/**
|
|
32 |
* @fn const char* CacheException::GetErrorMessage(void)
|
|
33 |
* @brief Retrieve text error message.
|
|
34 |
* @return The error message.
|
|
35 |
*/
|
|
36 |
const char* GetErrorMessage(void);
|
|
37 |
|
|
38 |
virtual ~CacheException(void);
|
|
39 |
|
|
40 |
static int EPOCROOT_NOT_FOUND ;
|
|
41 |
static int RESOURCE_ALLOCATION_FAILURE;
|
|
42 |
static int CACHE_NOT_FOUND ;
|
|
43 |
static int CACHE_INVALID ;
|
|
44 |
static int CACHE_IS_EMPTY ;
|
|
45 |
static int HARDDRIVE_FAILURE ;
|
|
46 |
protected:
|
|
47 |
int errcode;
|
|
48 |
private:
|
|
49 |
CacheException(void);
|
|
50 |
|
|
51 |
CacheException& operator = (const CacheException&);
|
|
52 |
};
|
|
53 |
|
|
54 |
|
|
55 |
#endif /* defined ROM_TOOLS_ROFSBUILD_CACHE_CACHEEXCEPTION_H_ */
|