proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
ErrorCode.cpp
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
#include <
proxygen/lib/http/codec/ErrorCode.h
>
11
12
#include <glog/logging.h>
13
14
namespace
proxygen
{
15
16
const
uint8_t
kMaxErrorCode
= 12;
17
18
const
char
*
getErrorCodeString
(
ErrorCode
error
) {
19
switch
(error) {
20
case
ErrorCode::NO_ERROR
:
return
"NO_ERROR"
;
21
case
ErrorCode::PROTOCOL_ERROR
:
return
"PROTOCOL_ERROR"
;
22
case
ErrorCode::INTERNAL_ERROR
:
return
"INTERNAL_ERROR"
;
23
case
ErrorCode::FLOW_CONTROL_ERROR
:
return
"FLOW_CONTROL_ERROR"
;
24
case
ErrorCode::SETTINGS_TIMEOUT
:
return
"SETTINGS_TIMEOUT"
;
25
case
ErrorCode::STREAM_CLOSED
:
return
"STREAM_CLOSED"
;
26
case
ErrorCode::FRAME_SIZE_ERROR
:
return
"FRAME_SIZE_ERROR"
;
27
case
ErrorCode::REFUSED_STREAM
:
return
"REFUSED_STREAM"
;
28
case
ErrorCode::CANCEL
:
return
"CANCEL"
;
29
case
ErrorCode::COMPRESSION_ERROR
:
return
"COMPRESSION_ERROR"
;
30
case
ErrorCode::CONNECT_ERROR
:
return
"CONNECT_ERROR"
;
31
case
ErrorCode::ENHANCE_YOUR_CALM
:
return
"ENHANCE_YOUR_CALM"
;
32
case
ErrorCode::INADEQUATE_SECURITY
:
return
"INADEQUATE_SECURITY"
;
33
case
ErrorCode::HTTP_1_1_REQUIRED
:
return
"HTTP_1_1_REQUIRED"
;
34
case
ErrorCode::_SPDY_INVALID_STREAM
:
return
"_SPDY_INVALID_STREAM"
;
35
}
36
LOG(FATAL) <<
"Unreachable"
;
37
return
""
;
38
}
39
40
}
proxygen::ErrorCode::FLOW_CONTROL_ERROR
proxygen::ErrorCode::ENHANCE_YOUR_CALM
proxygen::ErrorCode::PROTOCOL_ERROR
proxygen::ErrorCode::COMPRESSION_ERROR
proxygen::ErrorCode::INADEQUATE_SECURITY
proxygen::ErrorCode::NO_ERROR
folly::pushmi::operators::error
requires And< SemiMovable< VN >... > &&SemiMovable< E > auto error(E e)
Definition:
error.h:48
proxygen::ErrorCode::HTTP_1_1_REQUIRED
ErrorCode.h
uint8_t
uint8_t
Definition:
ConstexprMathBenchmark.cpp:178
proxygen::ErrorCode::REFUSED_STREAM
proxygen::getErrorCodeString
const char * getErrorCodeString(ErrorCode error)
Definition:
ErrorCode.cpp:18
proxygen::ErrorCode::CONNECT_ERROR
proxygen::kMaxErrorCode
const uint8_t kMaxErrorCode
Definition:
ErrorCode.cpp:16
proxygen::ErrorCode::FRAME_SIZE_ERROR
proxygen::ErrorCode
ErrorCode
Definition:
ErrorCode.h:26
proxygen::ErrorCode::CANCEL
proxygen::ErrorCode::INTERNAL_ERROR
proxygen::ErrorCode::STREAM_CLOSED
proxygen::ErrorCode::_SPDY_INVALID_STREAM
proxygen
Definition:
ExMessageHandler.h:14
proxygen::ErrorCode::SETTINGS_TIMEOUT
proxygen
lib
http
codec
ErrorCode.cpp
Generated by
1.8.11