-
Notifications
You must be signed in to change notification settings - Fork 0
/
error-cast.cpp
46 lines (46 loc) · 1.27 KB
/
error-cast.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <string>
using namespace std;
string errorCast(int n){
string errors[]= {
"IMR_RES_OK",
"IMR_RES_ERROR",
"IMR_RES_INVALID_PARAMETER",
"IMR_RES_NOT_INITIALIZED",
"IMR_RES_ALREADY_INITIALIZED",
"IMR_RES_MEMALLOC_FAILED",
"IMR_RES_UNSUPPORTED",
"IMR_RES_CLIENT_NOT_FOUND",
"IMR_RES_DUPLICATE_CLIENT",
"IMR_RES_CLIENT_NOT_ACTIVE",
"IMR_RES_CLIENT_ACTIVE",
"IMR_RES_SESSION_ALREADY_OPEN",
"IMR_RES_SESSION_CLOSED",
"IMR_RES_SOCKET_ERROR",
"IMR_RES_UNKNOWN_PROTOCOL",
"IMR_RES_PROTOCOL_ALREADY_REGISTERED",
"IMR_RES_PENDING",
"IMR_RES_UNEXPECTED_PACKET",
"IMR_RES_TIMEOUT",
"IMR_RES_CORRUPT_PACKET",
"IMR_RES_OS_ERROR",
"IMR_RES_IDER_VERSION_NOT_SUPPORTED",
"IMR_RES_IDER_COMMAND_RUNNING",
"IMR_RES_STORAGE_FAILURE",
"IMR_RES_UNKNOWN",
"IMR_RES_AUTH_FAILED",
"IMR_RES_CLIENT_TYPE_UNKNOWN",
"IMR_RES_CLIENT_BUSY",
"IMR_RES_CLIENT_UNSUPPORTED",
"IMR_RES_CLIENT_ERROR",
"IMR_RES_NOT_ENOUGH_SPACE",
"IMR_RES_SESSION_LOOPBACK",
"IMR_RES_TLS_CONNECTION_FAILED",
"IMR_RES_SOCKS_ERROR",
"IMR_RES_SOCKS_AUTH_FAIL",
"IMR_RES_OOB_SOL_DISABLED",
"IMR_RES_AUDIT_LOG_FULL",
"IMR_RES_CLIENT_INVALID_OPTION",
"IMR_RES_USER_CONSENT_REQUIRED",
"IMR_RES_COUNT" } ;
return errors[n];
}