dxFeed C API  6.0.1
dxFeed C API library intended to provide market data access for DX clients
DXErrorCodes.h
Go to the documentation of this file.
1 /*
2  * The contents of this file are subject to the Mozilla Public License Version
3  * 1.1 (the "License"); you may not use this file except in compliance with
4  * the License. You may obtain a copy of the License at
5  * http://www.mozilla.org/MPL/
6  *
7  * Software distributed under the License is distributed on an "AS IS" basis,
8  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
9  * for the specific language governing rights and limitations under the
10  * License.
11  *
12  * The Initial Developer of the Original Code is dxFeed Solutions DE GmbH.
13  * Portions created by the Initial Developer are Copyright (C) 2010
14  * the Initial Developer. All Rights Reserved.
15  *
16  * Contributor(s):
17  *
18  */
19 
20 #ifndef DX_ERROR_CODES_H_INCLUDED
21 #define DX_ERROR_CODES_H_INCLUDED
22 
23 #include "DXTypes.h"
24 
30 /* -------------------------------------------------------------------------- */
31 /*
32  * Error codes
33  */
34 /* -------------------------------------------------------------------------- */
35 
37 typedef enum {
38  dx_el_info = 0,
39  dx_el_warn = 1,
40  dx_el_error = 2
42 
44 typedef enum {
45  /* common error codes */
46 
47  dx_ec_success = 0,
48 
49  dx_ec_error_subsystem_failure = 1, /* this code may be set if passed from another thread */
50  dx_ec_invalid_func_param = 2, /* the invalid param is submitted by client */
51  dx_ec_invalid_func_param_internal = 3, /* the invalid param is a result of internal error */
52  dx_ec_internal_assert_violation = 4,
53 
54  /* memory error codes */
55 
56  dx_mec_insufficient_memory = 5,
57 
58  /* socket error codes */
59 
60  dx_sec_socket_subsystem_init_failed = 6, /* Win32-specific */
61  dx_sec_socket_subsystem_init_required = 7, /* Win32-specific */
62  dx_sec_socket_subsystem_incompatible_version = 8, /* Win32-specific */
63  dx_sec_connection_gracefully_closed = 9,
64  dx_sec_network_is_down = 10,
65  dx_sec_blocking_call_in_progress = 11,
66  dx_sec_addr_family_not_supported = 12,
67  dx_sec_no_sockets_available = 13,
68  dx_sec_no_buffer_space_available = 14,
69  dx_sec_proto_not_supported = 15,
70  dx_sec_socket_type_proto_incompat = 16,
71  dx_sec_socket_type_addrfam_incompat = 17,
72  dx_sec_addr_already_in_use = 18,
73  dx_sec_blocking_call_interrupted = 19,
74  dx_sec_nonblocking_oper_pending = 20,
75  dx_sec_addr_not_valid = 21,
76  dx_sec_connection_refused = 22,
77  dx_sec_invalid_ptr_arg = 23,
78  dx_sec_invalid_arg = 24,
79  dx_sec_sock_already_connected = 25,
80  dx_sec_network_is_unreachable = 26,
81  dx_sec_sock_oper_on_nonsocket = 27,
82  dx_sec_connection_timed_out = 28,
83  dx_sec_res_temporarily_unavail = 29,
84  dx_sec_permission_denied = 30,
85  dx_sec_network_dropped_connection = 31,
86  dx_sec_socket_not_connected = 32,
87  dx_sec_operation_not_supported = 33,
88  dx_sec_socket_shutdown = 34,
89  dx_sec_message_too_long = 35,
90  dx_sec_no_route_to_host = 36,
91  dx_sec_connection_aborted = 37,
92  dx_sec_connection_reset = 38,
93  dx_sec_persistent_temp_error = 39,
94  dx_sec_unrecoverable_error = 40,
95  dx_sec_not_enough_memory = 41,
96  dx_sec_no_data_on_host = 42,
97  dx_sec_host_not_found = 43,
98  dx_sec_generic_error = 44,
99 
100  /* thread error codes */
101 
102  dx_tec_not_enough_sys_resources = 45,
103  dx_tec_permission_denied = 46,
104  dx_tec_invalid_res_operation = 47,
105  dx_tec_invalid_resource_id = 48,
106  dx_tec_deadlock_detected = 49,
107  dx_tec_not_enough_memory = 50,
108  dx_tec_resource_busy = 51,
109  dx_tec_generic_error = 52,
110 
111  /* network error codes */
112 
113  dx_nec_invalid_port_value = 53,
114  dx_nec_invalid_function_arg = 54,
115  dx_nec_connection_closed = 55,
116  dx_nec_open_connection_error = 56,
117  dx_nec_unknown_codec = 57,
118 
119  /* buffered I/O error codes */
120 
121  dx_bioec_buffer_overflow = 58,
122  dx_bioec_buffer_not_initialized = 59,
123  dx_bioec_index_out_of_bounds = 60,
124  dx_bioec_buffer_underflow = 61,
125 
126  /* UTF error codes */
127 
128  dx_utfec_bad_utf_data_format = 62,
129  dx_utfec_bad_utf_data_format_server = 63,
130 
131  /* penta codec error codes */
132 
133  dx_pcec_reserved_bit_sequence = 64,
134  dx_pcec_invalid_symbol_length = 65,
135  dx_pcec_invalid_event_flag = 66,
136 
137  /* event subscription error codes */
138 
139  dx_esec_invalid_event_type = 67,
140  dx_esec_invalid_subscr_id = 68,
141  dx_esec_invalid_symbol_name = 69,
142  dx_esec_invalid_listener = 70,
143 
144  /* logger error codes */
145 
146  dx_lec_failed_to_open_file = 71,
147 
148  /* protocol message error codes */
149 
150  dx_pmec_invalid_message_type = 72,
151 
152  /* protocol error codes */
153 
154  dx_pec_unexpected_message_type = 73,
155  dx_pec_unexpected_message_type_internal = 74,
156  dx_pec_descr_record_field_info_corrupted = 75,
157  dx_pec_message_incomplete = 76,
158  dx_pec_invalid_message_length = 77,
159  dx_pec_server_message_not_supported = 78,
160  dx_pec_invalid_symbol = 79,
161  dx_pec_record_description_not_received = 80,
162  dx_pec_record_field_type_not_supported = 81,
163  dx_pec_record_info_corrupted = 82,
164  dx_pec_unknown_record_name = 83,
165  dx_pec_record_not_supported = 84,
166  dx_pec_describe_protocol_message_corrupted = 85,
167  dx_pec_unexpected_message_sequence_internal = 86,
168  dx_pec_local_message_not_supported_by_server = 87,
169  dx_pec_inconsistent_message_support = 88,
170  dx_pec_authentication_error = 89,
171  dx_pec_credentials_required = 90,
172 
173  /* connection error codes */
174 
175  dx_cec_invalid_connection_handle = 91,
176  dx_cec_invalid_connection_handle_internal = 92,
177  dx_cec_connection_context_not_initialized = 93,
178  dx_cec_invalid_connection_context_subsystem_id = 94,
179 
180  /* candle event error codes*/
181 
182  dx_ceec_invalid_candle_period_value = 95,
183 
184  /* snapshot error codes */
185 
186  dx_ssec_invalid_snapshot_id = 96,
187  dx_ssec_invalid_event_id = 97,
188  dx_ssec_invalid_symbol = 98,
189  dx_ssec_snapshot_exist = 99,
190  dx_ssec_invalid_listener = 100,
191  dx_ssec_unknown_state = 101,
192  dx_ssec_duplicate_record = 102,
193 
194  /* configuration record serialization deserialization error codes */
195 
196  dx_csdec_protocol_error = 103,
197  dx_csdec_unsupported_version = 104,
198 
199  /* miscellaneous error codes */
200 
201  /* error code count */
202  /* this MUST be the last element in the enumeration */
203 
204  dx_ec_count
206 
207 /* -------------------------------------------------------------------------- */
218 /* -------------------------------------------------------------------------- */
220 
221 /* -------------------------------------------------------------------------- */
232 /* -------------------------------------------------------------------------- */
234 
235 #endif /* DX_ERROR_CODES_H_INCLUDED */
dx_error_level_t
Error level.
Definition: DXErrorCodes.h:37
dx_error_level_t dx_get_error_level(dx_error_code_t code)
Returns error level by error code.
dxf_const_string_t dx_get_error_description(dx_error_code_t code)
Returns error description by error code.
dxFeed C API types declarations
dx_error_code_t
Error code.
Definition: DXErrorCodes.h:44
const dxf_char_t * dxf_const_string_t
Const String.
Definition: DXTypes.h:123