proxygen
|
#include <AsyncSocketException.h>
Public Types | |
enum | AsyncSocketExceptionType { UNKNOWN = 0, NOT_OPEN = 1, ALREADY_OPEN = 2, TIMED_OUT = 3, END_OF_FILE = 4, INTERRUPTED = 5, BAD_ARGS = 6, CORRUPTED_DATA = 7, INTERNAL_ERROR = 8, NOT_SUPPORTED = 9, INVALID_STATE = 10, SSL_ERROR = 12, COULD_NOT_BIND = 13, SASL_HANDSHAKE_TIMEOUT = 14, NETWORK_ERROR = 15, EARLY_DATA_REJECTED = 16 } |
Public Member Functions | |
AsyncSocketException (AsyncSocketExceptionType type, const std::string &message, int errnoCopy=0) | |
AsyncSocketExceptionType | getType () const noexcept |
int | getErrno () const noexcept |
Static Protected Member Functions | |
static folly::StringPiece | getExceptionTypeString (AsyncSocketExceptionType type) |
static std::string | getMessage (AsyncSocketExceptionType type, const std::string &message, int errnoCopy) |
Protected Attributes | |
AsyncSocketExceptionType | type_ |
int | errno_ |
Definition at line 26 of file AsyncSocketException.h.
Definition at line 28 of file AsyncSocketException.h.
|
inline |
Definition at line 47 of file AsyncSocketException.h.
|
inlinenoexcept |
|
staticprotected |
get the string of exception type
Definition at line 24 of file AsyncSocketException.cpp.
References ALREADY_OPEN, BAD_ARGS, CORRUPTED_DATA, COULD_NOT_BIND, EARLY_DATA_REJECTED, END_OF_FILE, INTERNAL_ERROR, INTERRUPTED, INVALID_STATE, NETWORK_ERROR, NOT_OPEN, NOT_SUPPORTED, SASL_HANDSHAKE_TIMEOUT, SSL_ERROR, TIMED_OUT, and UNKNOWN.
Referenced by getMessage().
|
staticprotected |
Return a message based on the input.
Definition at line 64 of file AsyncSocketException.cpp.
References folly::errnoStr(), getExceptionTypeString(), and folly::sformat().
|
inlinenoexcept |
Definition at line 55 of file AsyncSocketException.h.
References type_.
Referenced by fizz::AsyncFizzBase::deliverError(), fizz::test::HandshakeTest::expectEarlyDataRejectError(), folly::TEST(), TEST(), fizz::test::TEST_F(), and fizz::client::test::TEST_F().
|
protected |
A copy of the errno.
Definition at line 78 of file AsyncSocketException.h.
|
protected |
Error code
Definition at line 75 of file AsyncSocketException.h.