proxygen
|
#include <HTTPException.h>
Public Types | |
enum | Direction { Direction::INGRESS = 0, Direction::EGRESS, Direction::INGRESS_AND_EGRESS } |
Private Attributes | |
Direction | dir_ |
uint32_t | httpStatusCode_ {0} |
folly::Optional< ErrorCode > | codecStatusCode_ |
uint32_t | errno_ {0} |
std::unique_ptr< folly::IOBuf > | currentIngressBuf_ |
std::unique_ptr< HTTPMessage > | partialMsg_ |
This class encapsulates the various errors that can occur on an http session. Errors can occur at various levels: the connection can be closed for reads and/or writes, the message body may fail to parse, or various protocol constraints may be violated.
Definition at line 26 of file HTTPException.h.
|
strong |
Indicates which direction of the data flow was affected by this exception. For instance, if a class receives HTTPException(INGRESS), then it should consider ingress callbacks finished (whether or not the underlying transport actually shut down). Likewise for HTTPException(EGRESS), the class should consider the write stream shut down. INGRESS_AND_EGRESS indicates both directions are finished.
Enumerator | |
---|---|
INGRESS | |
EGRESS | |
INGRESS_AND_EGRESS |
Definition at line 36 of file HTTPException.h.
|
inlineexplicit |
Definition at line 42 of file HTTPException.h.
|
inline |
Definition at line 46 of file HTTPException.h.
References currentIngressBuf_, describe(), partialMsg_, and string.
std::string proxygen::HTTPException::describe | ( | ) | const |
Returns a string representation of this exception. This function is intended for debugging and logging only. For the true exception string, use what()
Definition at line 18 of file HTTPException.cpp.
Referenced by HTTPException().
|
inline |
Definition at line 101 of file HTTPException.h.
References codecStatusCode_, and hasCodecStatusCode().
Referenced by proxygen::SimpleController::getParseErrorHandler(), proxygen::HTTPTransaction::onError(), proxygen::HTTPSession::onNewTransactionParseError(), proxygen::HTTPSession::onSessionParseError(), proxygen::operator<<(), and TEST_F().
|
inline |
Definition at line 67 of file HTTPException.h.
References dir_.
Referenced by proxygen::HTTPTransaction::onError(), proxygen::operator<<(), and TEST_F().
|
inline |
|
inline |
Definition at line 90 of file HTTPException.h.
References httpStatusCode_.
Referenced by proxygen::SimpleController::getParseErrorHandler(), and proxygen::operator<<().
|
inline |
Definition at line 95 of file HTTPException.h.
References codecStatusCode_, and folly::Optional< Value >::hasValue().
Referenced by getCodecStatusCode(), proxygen::SimpleController::getParseErrorHandler(), proxygen::HTTPTransaction::onError(), proxygen::HTTPSession::onNewTransactionParseError(), proxygen::HTTPSession::onSessionParseError(), proxygen::operator<<(), and TEST_F().
|
inline |
|
inline |
Definition at line 82 of file HTTPException.h.
References httpStatusCode_.
Referenced by proxygen::SimpleController::getParseErrorHandler().
|
inline |
|
inline |
|
inline |
Definition at line 121 of file HTTPException.h.
References currentIngressBuf_, and folly::gen::move.
|
inline |
Definition at line 129 of file HTTPException.h.
References folly::gen::move, and partialMsg_.
|
inline |
Definition at line 98 of file HTTPException.h.
References codecStatusCode_, and statusCode.
Referenced by proxygen::HTTP2Codec::checkConnectionError(), proxygen::SPDYCodec::failSession(), proxygen::SPDYCodec::failStream(), proxygen::HTTPSession::invalidStream(), proxygen::HTTPSession::onAbort(), proxygen::HTTPSession::onHeadersComplete(), proxygen::HTTPTransaction::onIngressTimeout(), proxygen::HTTPSession::onMessageBegin(), proxygen::HTTPSession::onPushMessageBegin(), proxygen::HTTPTransaction::sendBodyNow(), proxygen::HTTP2Codec::streamError(), TEST(), and TEST_F().
|
inline |
Definition at line 117 of file HTTPException.h.
References currentIngressBuf_, and folly::gen::move.
Referenced by proxygen::SPDYCodec::failSession(), proxygen::SPDYCodec::failStream(), and proxygen::HTTP1xCodec::onParserError().
|
inline |
|
inline |
Definition at line 86 of file HTTPException.h.
References httpStatusCode_, and statusCode.
Referenced by proxygen::SPDYCodec::failStream(), proxygen::HTTPChecks::onHeadersComplete(), proxygen::HTTP1xCodec::onParserError(), and TEST_F().
|
inline |
Definition at line 125 of file HTTPException.h.
References folly::gen::move, and partialMsg_.
Referenced by proxygen::SPDYCodec::failStream(), and proxygen::HTTP1xCodec::onParserError().
|
private |
Definition at line 137 of file HTTPException.h.
Referenced by getCodecStatusCode(), hasCodecStatusCode(), and setCodecStatusCode().
|
private |
Definition at line 140 of file HTTPException.h.
Referenced by HTTPException(), moveCurrentIngressBuf(), and setCurrentIngressBuf().
|
private |
Definition at line 135 of file HTTPException.h.
Referenced by getDirection(), isEgressException(), and isIngressException().
|
private |
Definition at line 138 of file HTTPException.h.
Referenced by getErrno(), hasErrno(), and setErrno().
|
private |
Definition at line 136 of file HTTPException.h.
Referenced by getHttpStatusCode(), hasHttpStatusCode(), and setHttpStatusCode().
|
private |
Definition at line 142 of file HTTPException.h.
Referenced by HTTPException(), movePartialMsg(), and setPartialMsg().