]>
Commit | Line | Data |
---|---|---|
bbc27441 | 1 | /* |
77b1029d | 2 | * Copyright (C) 1996-2020 The Squid Software Foundation and contributors |
bbc27441 AJ |
3 | * |
4 | * Squid software is distributed under GPLv2+ license and includes | |
5 | * contributions from numerous individuals and organizations. | |
6 | * Please see the COPYING and CONTRIBUTORS files for details. | |
7 | */ | |
8 | ||
64b66b76 CT |
9 | #ifndef _SQUID_ERR_DETAIL_H |
10 | #define _SQUID_ERR_DETAIL_H | |
11 | ||
12 | typedef enum { | |
13 | ERR_DETAIL_NONE, | |
14 | ERR_DETAIL_START = 100000, // to avoid clashes with most OS error numbers | |
4198165f CT |
15 | ERR_DETAIL_REDIRECTOR_TIMEDOUT = ERR_DETAIL_START, // External redirector request timed-out |
16 | ERR_DETAIL_CLT_REQMOD_ABORT, // client-facing code detected transaction abort | |
d5430dc8 AJ |
17 | ERR_DETAIL_CLT_REQMOD_REQ_BODY, // client-facing code detected REQMOD request body adaptation failure |
18 | ERR_DETAIL_CLT_REQMOD_RESP_BODY, // client-facing code detected REQMOD satisfaction reply body failure | |
19 | ERR_DETAIL_SRV_REQMOD_REQ_BODY, // server-facing code detected REQMOD request body abort | |
64b66b76 CT |
20 | ERR_DETAIL_ICAP_RESPMOD_EARLY, // RESPMOD failed w/o store entry |
21 | ERR_DETAIL_ICAP_RESPMOD_LATE, // RESPMOD failed with a store entry | |
3af10ac0 AR |
22 | ERR_DETAIL_REQMOD_BLOCK, // REQMOD denied client access |
23 | ERR_DETAIL_RESPMOD_BLOCK_EARLY, // RESPMOD denied client access to HTTP response, before any part of the response was sent | |
24 | ERR_DETAIL_RESPMOD_BLOCK_LATE, // RESPMOD denied client access to HTTP response, after [a part of] the response was sent | |
64b66b76 | 25 | ERR_DETAIL_ICAP_XACT_START, // transaction start failure |
1b091aec | 26 | ERR_DETAIL_ICAP_XACT_SSL_START, // transaction start failure |
64b66b76 CT |
27 | ERR_DETAIL_ICAP_XACT_BODY_CONSUMER_ABORT, // transaction body consumer gone |
28 | ERR_DETAIL_ICAP_INIT_GONE, // initiator gone | |
29 | ERR_DETAIL_ICAP_XACT_CLOSE, // ICAP connection closed unexpectedly | |
30 | ERR_DETAIL_ICAP_XACT_OTHER, // other ICAP transaction errors | |
31 | ERR_DETAIL_EXCEPTION_OTHER, //other errors ( eg std C++ lib errors) | |
32 | ERR_DETAIL_MAX, | |
33 | ERR_DETAIL_EXCEPTION_START = 110000 // offset for exception ID details | |
34 | } err_detail_type; | |
35 | ||
36 | extern const char *err_detail_type_str[]; | |
37 | ||
38 | inline | |
b3c9f64a A |
39 | const char *errorDetailName(int errDetailId) |
40 | { | |
64b66b76 CT |
41 | if (errDetailId < ERR_DETAIL_START) |
42 | return "SYSERR"; | |
43 | ||
44 | if (errDetailId < ERR_DETAIL_MAX) | |
45 | return err_detail_type_str[errDetailId-ERR_DETAIL_START+2]; | |
b3c9f64a | 46 | |
64b66b76 CT |
47 | if (errDetailId >=ERR_DETAIL_EXCEPTION_START) |
48 | return "EXCEPTION"; | |
49 | ||
50 | return "UNKNOWN"; | |
51 | } | |
52 | ||
53 | #endif | |
f53969cc | 54 |