ThingWorx C SDK
twErrors.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017, PTC, Inc.
3  *
4  * Error code definitions
5  */
6 
13 #ifndef TW_ERRORS_H
14 #define TW_ERRORS_H
15 
16 #define TW_OK 0
17 
21 #define TW_UNKNOWN_ERROR 100
22 #define TW_INVALID_PARAM 101
23 #define TW_ERROR_ALLOCATING_MEMORY 102
24 #define TW_ERROR_CREATING_MTX 103
25 #define TW_ERROR_WRITING_FILE 104
26 #define TW_ERROR_READING_FILE 105
27 #define TW_ERROR_ITEM_EXISTS 106
28 #define TW_ERROR_ITEM_DOES_NOT_EXIST 107
29 #define TW_ERROR_SHAPE_DOES_NOT_EXIST 108
30 #define TW_ERROR_TEMPLATE_DOES_NOT_EXIST 109
31 
34 #define TW_UNKNOWN_WEBSOCKET_ERROR 200
35 #define TW_ERROR_INITIALIZING_WEBSOCKET 201
36 #define TW_TIMEOUT_INITIALIZING_WEBSOCKET 202
37 #define TW_WEBSOCKET_NOT_CONNECTED 203
38 #define TW_ERROR_PARSING_WEBSOCKET_DATA 204
39 #define TW_ERROR_READING_FROM_WEBSOCKET 205
40 #define TW_WEBSOCKET_FRAME_TOO_LARGE 206
41 #define TW_INVALID_WEBSOCKET_FRAME_TYPE 207
42 #define TW_WEBSOCKET_MSG_TOO_LARGE 208
43 #define TW_ERROR_WRITING_TO_WEBSOCKET 209
44 #define TW_INVALID_ACCEPT_KEY 210
45 
49 #define TW_NULL_OR_INVALID_MSG_HANDLER 300
50 #define TW_INVALID_CALLBACK_STRUCT 301
51 #define TW_ERROR_CALLBACK_NOT_FOUND 302
52 #define TW_INVALID_MSG_CODE 303
53 #define TW_INVALID_MSG_TYPE 304
54 #define TW_ERROR_SENDING_MSG 305
55 #define TW_ERROR_WRITING_OFFLINE_MSG_STORE 306
56 #define TW_ERROR_MESSAGE_TOO_LARGE 307
57 #define TW_WROTE_TO_OFFLINE_MSG_STORE 308
58 #define TW_INVALID_MSG_STORE_DIR 309
59 #define TW_MSG_STORE_FILE_NOT_EMPTY 310
60 #define TW_NULL_MSG_BODY 311
61 #define TW_BIND_MESSAGE_FULL 312
62 #define TW_NULL_OR_INVALID_OFFLINE_MSG_STORE_SINGLETON 313
63 #define TW_ERROR_OFFLINE_MSG_STORE_FULL 314
64 #define TW_ERROR_INFLATING_RECEIVED_MSG 315
65 
66 
70 #define TW_ERROR_ADDING_DATASHAPE_ENTRY 400
71 #define TW_INDEX_NOT_FOUND 401
72 #define TW_ERROR_GETTING_PRIMITIVE 402
73 #define TW_INVALID_BASE_TYPE 403
74 
78 #define TW_LIST_ENTRY_NOT_FOUND 500
79 
83 #define TW_NULL_OR_INVALID_API_SINGLETON 600
84 #define TW_ERROR_SENDING_RESP 601
85 #define TW_INVALID_MSG_BODY 602
86 #define TW_INVALID_MSG_PARAMS 603
87 #define TW_INVALID_RESP_MSG 604
88 #define TW_NULL_API_SINGLETON 605
89 #define TW_ERROR_CREATING_MSG 606
90 #define TW_ERROR_INITIALIZING_API 607
91 
95 #define TW_MAX_TASKS_EXCEEDED 700
96 #define TW_TASK_NOT_FOUND 701
97 #define TW_THREADING_MODEL_FAILED_SHUTDOWN 702
98 
102 #define TW_NULL_OR_INVALID_LOGGER_SINGLETON 800
103 
107 #define TW_BASE64_ENCODE_OVERRUN 900
108 #define TW_BASE64_DECODE_OVERRUN 901
109 #define TW_ERROR_INITIALIZING_OFFLINE_MSG_STORE 910
110 #define TW_ERROR_FEATURE_NOT_SUPPORTED 911
111 
115 #define TW_ERROR_WRITING_TO_SOCKET 1000
116 #define TW_SOCKET_INIT_ERROR 1001
117 #define TW_INVALID_SSL_CERT 1002
118 #define TW_SOCKET_NOT_FOUND 1003
119 #define TW_HOST_NOT_FOUND 1004
120 #define TW_ERROR_CREATING_SSL_CTX 1005
121 #define TW_ERROR_CONNECTING_TO_PROXY 1006
122 #define TW_TIMEOUT_READING_FROM_SOCKET 1007
123 #define TW_ERROR_READING_RESPONSE 1008
124 #define TW_INVALID_PROXY_CREDENTIALS 1009
125 #define TW_UNSUPPORTED_PROXY_AUTH_TYPE 1010
126 #define TW_ENABLE_FIPS_MODE_FAILED 1011
127 #define TW_FIPS_MODE_NOT_SUPPORTED 1012
128 #define TW_DISABLE_FIPS_MODE_FAILED 1013
129 
132 #define TW_BAD_REQUEST 1100
133 #define TW_UNAUTHORIZED 1101
134 #define TW_ERROR_BAD_OPTION 1102
135 #define TW_FORBIDDEN 1103
136 #define TW_NOT_FOUND 1104
137 #define TW_METHOD_NOT_ALLOWED 1105
138 #define TW_NOT_ACCEPTABLE 1106
139 #define TW_PRECONDITION_FAILED 1107
140 #define TW_ENTITY_TOO_LARGE 1108
141 #define TW_UNSUPPORTED_CONTENT_FORMAT 1109
142 #define TW_INTERNAL_SERVER_ERROR 1110
143 #define TW_NOT_IMPLEMENTED 1111
144 #define TW_BAD_GATEWAY 1112
145 #define TW_SERVICE_UNAVAILABLE 1113
146 #define TW_GATEWAY_TIMEOUT 1114
147 
151 #define TW_SUBSCRIBEDPROP_MGR_NOT_INTIALIZED 1200
152 #define TW_SUBSCRIBED_PROPERTY_NOT_FOUND 1201
153 #define TW_PROPERTY_CHANGE_BUFFER_FULL 1202
154 #define TW_SUBSCRIBED_PROPERTY_LIST_PERSISTED 1203
155 #define TW_SUBSCRIBED_PROPERTY_LIST_PERSIST_ERROR 1204
156 #define TW_SUBSCRIBED_PROPERTY_LIST_UNABLE_TO_PERSIST_ERROR 1205
157 #define TW_SUBSCRIBED_PROPERTY_SYNCHRONIZATION_TIMEOUT 1206
158 
159 
163 #define TW_FILE_XFER_MANAGER_NOT_INITIALIZED 1300
164 #define TW_ERROR_CREATING_STAGING_DIR 1301
165 #define TW_FILE_NOT_FOUND 1302
166 #define FILE_TRANSFER_FAILED 1303
167 
171 #define TW_TUNNEL_MANAGER_NOT_INITIALIZED 1400
172 #define TW_TUNNEL_CREATION_FAILED 1401
173 
177 #define TW_TLS_ERROR_LOADING_FILE 1501
178 
179 #endif