proxygen
ProxygenErrorEnum.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-present, Facebook, Inc.
3  * All rights reserved.
4  *
5  * This source code is licensed under the BSD-style license found in the
6  * LICENSE file in the root directory of this source tree. An additional grant
7  * of patent rights can be found in the PATENTS file in the same directory.
8  *
9  */
10 #pragma once
11 
12 namespace proxygen {
13 
14 // Max must be the last one.
15 #define PROXYGEN_ERROR_GEN(x) \
16  x(None), \
17  x(Message), \
18  x(Connect), \
19  x(ConnectTimeout), \
20  x(Read), \
21  x(Write), \
22  x(Timeout), \
23  x(Handshake), \
24  x(NoServer), \
25  x(MaxRedirects), \
26  x(InvalidRedirect), \
27  x(ResponseAction), \
28  x(MaxConnects), \
29  x(Dropped), \
30  x(Connection), \
31  x(ConnectionReset), \
32  x(ParseHeader), \
33  x(ParseBody), \
34  x(EOF), \
35  x(ClientRenegotiation), \
36  x(Unknown), \
37  x(BadDecompress), \
38  x(SSL), \
39  x(StreamAbort), \
40  x(StreamUnacknowledged), \
41  x(WriteTimeout), \
42  x(AddressPrivate), \
43  x(AddressFamilyNotSupported), \
44  x(DNSNoResults), \
45  x(MalformedInput), \
46  x(UnsupportedExpectation), \
47  x(MethodNotSupported), \
48  x(UnsupportedScheme), \
49  x(Shutdown), \
50  x(IngressStateTransition), \
51  x(ClientSilent), \
52  x(Canceled), \
53  x(ParseResponse), \
54  x(ConnRefused), \
55  x(DNSOtherServer), \
56  x(DNSOtherClient), \
57  x(DNSOtherCancelled), \
58  x(DNSshutdown), \
59  x(DNSgetaddrinfo), \
60  x(DNSthreadpool), \
61  x(DNSunimplemented), \
62  x(Network), \
63  x(Configuration), \
64  x(EarlyDataRejected), \
65  x(EarlyDataFailed), \
66  x(Max)
67 
68 // Increase this if you add more error types and Max exceeds 63
69 #define PROXYGEN_ERROR_BITSIZE 6
70 
71 #define PROXYGEN_ERROR_ENUM(error) kError##error
72 
75 };
76 
77 #undef PROXYGEN_ERROR_ENUM
78 
79 extern const char* getErrorString(ProxygenError error);
80 
81 extern const char* getErrorStringByIndex(int i);
82 
83 }
requires And< SemiMovable< VN >... > &&SemiMovable< E > auto error(E e)
Definition: error.h:48
const char * getErrorStringByIndex(int i)
#define PROXYGEN_ERROR_ENUM(error)
#define PROXYGEN_ERROR_GEN(x)
const char * getErrorString(ProxygenError error)