|
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #if !defined(__STOREEXCEPTION_H__) |
|
17 #define __STOREEXCEPTION_H__ |
|
18 |
|
19 namespace PCStore |
|
20 { |
|
21 /** |
|
22 @internalAll |
|
23 |
|
24 Class for the exceptions which will be thrown by the PCStore library. |
|
25 */ |
|
26 class TStoreException |
|
27 { |
|
28 public: |
|
29 //Enumerations for the store open mode |
|
30 enum EStoreError |
|
31 { |
|
32 /** |
|
33 library wide error code -1: fail to open file. |
|
34 */ |
|
35 EFileOpenError = -1, |
|
36 |
|
37 /** |
|
38 library wide error code -2: fail to read file. |
|
39 */ |
|
40 EFileReadError = -2, |
|
41 |
|
42 /** |
|
43 library wide error code -3: fail to write file. |
|
44 */ |
|
45 EFileWriteError = -3, |
|
46 |
|
47 /** |
|
48 library wide error code -4: fail to seek file. |
|
49 */ |
|
50 EFileSeekError = -4, |
|
51 |
|
52 /** |
|
53 library wide error code -5: attemp to create stream while another stream exists. |
|
54 */ |
|
55 EStreamExclusionError = -5, |
|
56 |
|
57 /** |
|
58 library wide error code -6: the file is not the supported store type. |
|
59 */ |
|
60 EStoreNotSupported = -6, |
|
61 |
|
62 /** |
|
63 library wide error code -7: operation on a mismatching type of store. |
|
64 */ |
|
65 EStoreModeError = -7, |
|
66 |
|
67 /** |
|
68 library wide error code -8: the store file is corrupted. |
|
69 */ |
|
70 EStoreCorrupt = -8, |
|
71 |
|
72 /** |
|
73 library wide error code -9: the maximum length of the descriptor overfloates |
|
74 */ |
|
75 EDesOverfloat = -9 |
|
76 }; |
|
77 TStoreException(EStoreError aCode); |
|
78 |
|
79 public: |
|
80 EStoreError iErrorCode; |
|
81 }; |
|
82 } |
|
83 #endif // !defined(__STOREEXCEPTION_H__) |