proxygen
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  */
11 
12 #include <glog/logging.h>
13 
14 namespace proxygen {
15 
17 
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 }
requires And< SemiMovable< VN >... > &&SemiMovable< E > auto error(E e)
Definition: error.h:48
const char * getErrorCodeString(ErrorCode error)
Definition: ErrorCode.cpp:18
const uint8_t kMaxErrorCode
Definition: ErrorCode.cpp:16