equal
deleted
inserted
replaced
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 #include "cxeerrormappingsymbian.h" |
|
18 #include "cxeerror.h" |
|
19 #include "e32err.h" |
|
20 |
|
21 /* |
|
22 * Mapping all symbian specific errors to cxerror id's |
|
23 */ |
|
24 CxeError::Id CxeErrorHandlingSymbian::map(int symbianerror) |
|
25 { |
|
26 CxeError::Id cxerror = CxeError::General; |
|
27 |
|
28 switch( symbianerror ) { |
|
29 case KErrNone: |
|
30 cxerror = CxeError::None; |
|
31 break; |
|
32 case KErrNotFound: |
|
33 cxerror = CxeError::NotFound; |
|
34 break; |
|
35 case KErrNotReady: |
|
36 cxerror = CxeError::NotReady; |
|
37 break; |
|
38 case KErrNotSupported: |
|
39 cxerror = CxeError::NotSupported; |
|
40 break; |
|
41 case KErrInUse: |
|
42 cxerror = CxeError::InUse; |
|
43 break; |
|
44 case KErrDied: |
|
45 cxerror = CxeError::Died; |
|
46 break; |
|
47 case KErrHardwareNotAvailable: |
|
48 cxerror = CxeError::HwNotAvailable; |
|
49 break; |
|
50 case KErrGeneral: |
|
51 cxerror = CxeError::General; |
|
52 break; |
|
53 case KErrDiskFull: |
|
54 cxerror = CxeError::DiskFull; |
|
55 break; |
|
56 default: |
|
57 break; |
|
58 } |
|
59 |
|
60 return cxerror; |
|
61 |
|
62 }; |
|