|
Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
|
BAS status codes and fatal-error reporting.

Go to the source code of this file.
Macros | |
| #define | baFatalE(ecode1, ecode2) baFatalEf(ecode1, ecode2, __FILE__, __LINE__) |
| Report a fatal condition with the current source file and line. More... | |
Enumerations | |
| enum | BaFatalErrorCodes { FE_MALLOC = HTTP_E_BASE , FE_ASSERT , FE_NO_SERV_CON , FE_SOCKET , FE_GETHOSTBYNAME , FE_GETHOSTBYNAME2 , FE_BIND , FE_LISTEN , FE_IOCTL , FE_SETSOCKOPT , FE_ACCEPT , FE_NO_IPV6_SUPPORT , FE_INVALID_CSPREADER , FE_CANNOT_READ , FE_MAGIC_NO , FE_THREAD_LIB , FE_SSL_ERROR , FE_HTTPCON_INVALID_DISPEV , FE_BLUA_PANIC , FE_EXIT , FE_INCORRECT_USE , FE_TYPE_SIZE_ERROR , FE_WRONG_ENDIAN , FE_USER_ERROR_1 = HTTP_E_BASE+100 , FE_USER_ERROR_2 , FE_USER_ERROR_3 , FE_USER_ERROR_4 , FE_USER_ERROR_5 , FE_USER_ERROR_6 , FE_USER_ERROR_7 , FE_USER_ERROR_8 , FE_USER_ERROR_9 , FE_USER_ERROR_10 } |
| Fatal conditions reported to UserDefinedErrHandler, not ordinary returns. More... | |
| enum | BaErrorCodes { } |
| Operation status codes. More... | |
Functions | |
| BA_API void | baFatalEf (BaFatalErrorCodes ecode1, unsigned int ecode2, const char *file, int line) |
| Invoke platform fatal-error handling and the configured application handler. More... | |
| BA_API const char * | baErr2Str (int ecode) |
| Convert an operation status to a short diagnostic string. More... | |
| BA_API int | baErr2HttpCode (int ecode) |
| Map selected I/O results to an HTTP response status. More... | |
| #define baFatalE | ( | ecode1, | |
| ecode2 | |||
| ) | baFatalEf(ecode1, ecode2, __FILE__, __LINE__) |
Report a fatal condition with the current source file and line.
| ecode1 | BaFatalErrorCodes condition. |
| ecode2 | Secondary code such as allocation byte count or OS error. See baFatalEf for control-flow behavior. No value is returned. |
| enum BaErrorCodes |
Operation status codes.
Zero means success where the calling API specifies it; negative values identify failures or special states. E_PROXY_READY is internal progress, not an error. Consult each API for its possible results; these are not HTTP response status numbers.
| Enumerator | |
|---|---|
| E_PAGE_NOT_FOUND | for HttpResponse include or forward |
| E_INCORRECT_USE | The API is not used correctly. |
| E_SHARK_ALERT_RECV | Call SharkSslCon_getAlertDescription. |
| E_NOT_TRUSTED | SSL certificate not trusted or domain mismatch. |
| E_TLS_CLOSE_NOTIFY | Peer is closing the connection. |
| E_PROXY_AUTH | Authentication required or wrong credentials. |
| E_PROXY_GENERAL | general SOCKS server failure |
| E_PROXY_NOT_ALLOWED | connection not allowed by ruleset |
| E_PROXY_NETWORK | Network unreachable. |
| E_PROXY_HOST | Host unreachable. |
| E_PROXY_REFUSED | Connection refused. |
| E_PROXY_TTL | TTL expired. |
| E_PROXY_COMMAND_NOT_SUP | Command not supported. |
| E_PROXY_ADDRESS_NOT_SUP | Address type not supported. |
| E_PROXY_NOT_COMPATIBLE | Not a supported SOCKS version. |
| E_PROXY_UNKNOWN | Unknown SOCKS error. |
| E_SYS_SHUTDOWN | Used by Mako Server (and others) when program exits. |
| enum BaFatalErrorCodes |
Fatal conditions reported to UserDefinedErrHandler, not ordinary returns.
The secondary code is condition/platform dependent. Applications should terminate or reset after a fatal callback; continued execution is not promised.
| BA_API int baErr2HttpCode | ( | int | ecode | ) |
Map selected I/O results to an HTTP response status.
| ecode | HTTP code 100..599 or I/O error code. |
| BA_API const char * baErr2Str | ( | int | ecode | ) |
Convert an operation status to a short diagnostic string.
| ecode | BAS, I/O, ZIP, or other explicitly supported status. |
| BA_API void baFatalEf | ( | BaFatalErrorCodes | ecode1, |
| unsigned int | ecode2, | ||
| const char * | file, | ||
| int | line | ||
| ) |
Invoke platform fatal-error handling and the configured application handler.
| ecode1 | Fatal condition. |
| ecode2 | Secondary condition/platform-specific detail. |
| file | Borrowed NUL-terminated diagnostic source filename. |
| line | Source line number. Use baFatalE to capture the call site. Default ports wait indefinitely when no handler is installed. Some ports permit a handler to return and others continue waiting; do not rely on returning as a recovery mechanism. |