Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
BaErrorCodes.h
Go to the documentation of this file.
1/*
2 * ____ _________ __ _
3 * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4 * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5 * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6 * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7 * /____/
8 *
9 * Barracuda Embedded Web-Server
10 *
11 ****************************************************************************
12 * HEADER
13 *
14 * $Id: BaErrorCodes.h 5978 2026-09-11 16:13:48Z wini $
15 *
16 * COPYRIGHT: Real Time Logic LLC, 2003-2021
17 *
18 * This software is copyrighted by and is the sole property of Real
19 * Time Logic LLC. All rights, title, ownership, or other interests in
20 * the software remain the property of Real Time Logic LLC. This
21 * software may only be used in accordance with the terms and
22 * conditions stipulated in the corresponding license agreement under
23 * which the software has been supplied. Any unauthorized use,
24 * duplication, transmission, distribution, or disclosure of this
25 * software is expressly forbidden.
26 *
27 * This Copyright notice may not be removed or modified without prior
28 * written consent of Real Time Logic LLC.
29 *
30 * Real Time Logic LLC. reserves the right to modify this software
31 * without notice.
32 *
33 * http://www.realtimelogic.com
34 ****************************************************************************
35 *
36 *
37 */
40#ifndef __BaErrorCodes_h
41#define __BaErrorCodes_h
42
43
44
49typedef enum {
50 FE_MALLOC = HTTP_E_BASE,
69 FE_EXIT,
70 FE_INCORRECT_USE,
74 FE_USER_ERROR_1 = HTTP_E_BASE+100,
75 FE_USER_ERROR_2,
76 FE_USER_ERROR_3,
77 FE_USER_ERROR_4,
78 FE_USER_ERROR_5,
79 FE_USER_ERROR_6,
80 FE_USER_ERROR_7,
81 FE_USER_ERROR_8,
82 FE_USER_ERROR_9,
83 FE_USER_ERROR_10
85
86
91typedef enum {
92 E_NO_ERROR=0,
93 E_INVALID_SOCKET_CON=-1000,
94 E_GETHOSTBYNAME,
95 E_BIND,
96 E_SOCKET_CLOSED,
97 E_SOCKET_WRITE_FAILED,
98 E_SOCKET_READ_FAILED,
99 E_TIMEOUT,
100 E_MALLOC,
101 E_ALREADY_INSERTED,
102 E_TOO_MUCH_DATA,
104 E_IS_COMMITTED,
105 E_INVALID_PARAM,
106 E_MIXING_WRITE_SEND,
107 E_TOO_MANY_INCLUDES,
108 E_TOO_MANY_FORWARDS,
109 E_INCLUDE_OP_NOT_VALID,
110
111 E_CANNOT_RESOLVE,
112 E_CANNOT_CONNECT,
113 E_INVALID_URL,
114 E_INVALID_RESPONSE,
115
118 E_TLS_NOT_ENABLED = -400,
120 E_TLS_CRYPTOERR,
121 E_TLS_HANDSHAKE,
135 E_PROXY_READY,/*Set HttpClient, not an error: socket in state proxy ready*/
138 E_SYS_SHUTDOWN = -600
140
141
142
148#define baFatalE(ecode1, ecode2) baFatalEf(ecode1, ecode2, __FILE__, __LINE__)
149#ifdef __cplusplus
150extern "C" {
151#endif
161BA_API void baFatalEf(BaFatalErrorCodes ecode1, unsigned int ecode2,
162 const char* file, int line);
163
169BA_API const char* baErr2Str(int ecode);
170
177BA_API int baErr2HttpCode(int ecode);
178#ifdef __cplusplus
179}
180#endif
181
182
183
184#endif /* __BaErrorCodes_h */
BaFatalErrorCodes
Fatal conditions reported to UserDefinedErrHandler, not ordinary returns.
Definition: BaErrorCodes.h:49
@ FE_NO_SERV_CON
error code 2 not used
Definition: BaErrorCodes.h:52
@ FE_SOCKET
error code 2 = errno
Definition: BaErrorCodes.h:53
@ FE_BLUA_PANIC
Lua panic: error 2 is code from exit()
Definition: BaErrorCodes.h:68
@ FE_GETHOSTBYNAME
error code 2 = errno
Definition: BaErrorCodes.h:54
@ FE_LISTEN
error code 2 = errno
Definition: BaErrorCodes.h:57
@ FE_SETSOCKOPT
error code 2 = errno
Definition: BaErrorCodes.h:59
@ FE_WRONG_ENDIAN
Incorrect B_LITTLE_ENDIAN/B_BIG_ENDIAN macro.
Definition: BaErrorCodes.h:72
@ FE_MAGIC_NO
error code 2 not used
Definition: BaErrorCodes.h:64
@ FE_GETHOSTBYNAME2
error code 2 = errno
Definition: BaErrorCodes.h:55
@ FE_SSL_ERROR
error code 2 not used
Definition: BaErrorCodes.h:66
@ FE_MALLOC
error code 2 = size needed
Definition: BaErrorCodes.h:50
@ FE_ACCEPT
error code 2 = errno
Definition: BaErrorCodes.h:60
@ FE_BIND
error code 2 = errno
Definition: BaErrorCodes.h:56
@ FE_NO_IPV6_SUPPORT
error code 2 not used
Definition: BaErrorCodes.h:61
@ FE_IOCTL
error code 2 = errno
Definition: BaErrorCodes.h:58
@ FE_INVALID_CSPREADER
error code 2 not used
Definition: BaErrorCodes.h:62
@ FE_THREAD_LIB
See threadlib for error code 2.
Definition: BaErrorCodes.h:65
@ FE_HTTPCON_INVALID_DISPEV
error code 2 not used
Definition: BaErrorCodes.h:67
@ FE_ASSERT
error code 2 not used
Definition: BaErrorCodes.h:51
@ FE_CANNOT_READ
error code 2 is the offset position
Definition: BaErrorCodes.h:63
@ FE_TYPE_SIZE_ERROR
One of U8 to U32 are of incorrect size.
Definition: BaErrorCodes.h:71
BA_API int baErr2HttpCode(int ecode)
Map selected I/O results to an HTTP response status.
BaErrorCodes
Operation status codes.
Definition: BaErrorCodes.h:91
@ E_PROXY_AUTH
Authentication required or wrong credentials.
Definition: BaErrorCodes.h:125
@ E_PROXY_REFUSED
Connection refused.
Definition: BaErrorCodes.h:130
@ E_SHARK_ALERT_RECV
Call SharkSslCon_getAlertDescription.
Definition: BaErrorCodes.h:119
@ E_SYS_SHUTDOWN
Used by Mako Server (and others) when program exits.
Definition: BaErrorCodes.h:138
@ E_PROXY_GENERAL
general SOCKS server failure
Definition: BaErrorCodes.h:126
@ E_PROXY_NOT_ALLOWED
connection not allowed by ruleset
Definition: BaErrorCodes.h:127
@ E_PROXY_NOT_COMPATIBLE
Not a supported SOCKS version.
Definition: BaErrorCodes.h:134
@ E_PROXY_ADDRESS_NOT_SUP
Address type not supported.
Definition: BaErrorCodes.h:133
@ E_NOT_TRUSTED
SSL certificate not trusted or domain mismatch.
Definition: BaErrorCodes.h:122
@ E_PROXY_UNKNOWN
Unknown SOCKS error.
Definition: BaErrorCodes.h:136
@ E_PROXY_COMMAND_NOT_SUP
Command not supported.
Definition: BaErrorCodes.h:132
@ E_PROXY_NETWORK
Network unreachable.
Definition: BaErrorCodes.h:128
@ E_PROXY_TTL
TTL expired.
Definition: BaErrorCodes.h:131
@ E_INCORRECT_USE
The API is not used correctly.
Definition: BaErrorCodes.h:116
@ E_TLS_CLOSE_NOTIFY
Peer is closing the connection.
Definition: BaErrorCodes.h:123
@ E_PROXY_HOST
Host unreachable.
Definition: BaErrorCodes.h:129
@ E_PAGE_NOT_FOUND
for HttpResponse include or forward
Definition: BaErrorCodes.h:103
BA_API void baFatalEf(BaFatalErrorCodes ecode1, unsigned int ecode2, const char *file, int line)
Invoke platform fatal-error handling and the configured application handler.
BA_API const char * baErr2Str(int ecode)
Convert an operation status to a short diagnostic string.