proxygen
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
ErrorCode.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
#include <cstdint>
13
14
#define RETURN_IF_ERROR(err) \
15
if (err != ErrorCode::NO_ERROR) { \
16
VLOG(4) << "Returning with error=" << getErrorCodeString(err); \
17
return err; \
18
}
19
20
namespace
proxygen
{
21
22
// Error codes are 32-bit fields that are used in RST_STREAM and GOAWAY
23
// frames to convey the reasons for the stream or connection error.
24
25
// We only need <1 byte to represent it in memory
26
enum class
ErrorCode
:
uint8_t
{
27
NO_ERROR
= 0,
28
PROTOCOL_ERROR
= 1,
29
INTERNAL_ERROR
= 2,
30
FLOW_CONTROL_ERROR
= 3,
31
SETTINGS_TIMEOUT
= 4,
32
STREAM_CLOSED
= 5,
33
FRAME_SIZE_ERROR
= 6,
34
REFUSED_STREAM
= 7,
35
CANCEL
= 8,
36
COMPRESSION_ERROR
= 9,
37
CONNECT_ERROR
= 10,
38
ENHANCE_YOUR_CALM
= 11,
39
INADEQUATE_SECURITY
= 12,
40
HTTP_1_1_REQUIRED
= 13,
41
// This code is *NOT* to be used outside of SPDYCodec. Delete this
42
// when we deprecate SPDY.
43
_SPDY_INVALID_STREAM
= 100,
44
};
45
46
extern
const
uint8_t
kMaxErrorCode
;
47
51
extern
const
char
*
getErrorCodeString
(
ErrorCode
error
);
52
53
}
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
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.h
Generated by
1.8.11