Represents a websocket error. This class holds an error message and an optional error code.
More...
#include <ws_client.h>
Inheritance diagram for web::websockets::client::websocket_exception:
Public Member Functions
Creates a
websocket_exception
from a error code using the current platform error category. The message of the error code will be used as the
what() string message.
More...
Creates a
websocket_exception
from a error code and category. The message of the error code will be used as the
what
string message.
More...
const char *
what () const CPPREST_NOEXCEPT
Gets a string identifying the cause of the exception.
More...
const std::error_code &
error_code () const CPPREST_NOEXCEPT
Gets the underlying error code for the cause of the exception.
More...
Detailed Description
Represents a websocket error. This class holds an error message and an optional error code.
Constructor & Destructor Documentation
web::websockets::client::websocket_exception::websocket_exception
(
const utility::string_t &
whatArg )
inline
Creates an websocket_exception
with just a string message and no error code.
- Parameters
-
whatArg Error message string.
web::websockets::client::websocket_exception::websocket_exception
(
int
errorCode )
inline
Creates a websocket_exception
from a error code using the current platform error category. The message of the error code will be used as the what() string message.
- Parameters
-
errorCode Error code value.
web::websockets::client::websocket_exception::websocket_exception
(
int
errorCode,
const utility::string_t &
whatArg
)
inline
Creates a websocket_exception
from a error code using the current platform error category.
- Parameters
-
errorCode Error code value.
whatArg Message to use in
what() string.
web::websockets::client::websocket_exception::websocket_exception
(
int
errorCode,
const std::error_category &
cat
)
inline
Creates a websocket_exception
from a error code and category. The message of the error code will be used as the what
string message.
- Parameters
-
errorCode Error code value.
cat Error category for the code.
web::websockets::client::websocket_exception::websocket_exception
(
std::error_code
code,
const utility::string_t &
whatArg
)
inline
Creates a websocket_exception
from a error code and string message to use as the what() argument.
- Parameters
-
code Error code.
whatArg Message to use in
what() string.
Member Function Documentation
const std::error_code& web::websockets::client::websocket_exception::error_code
(
)
const
inline
Gets the underlying error code for the cause of the exception.
- Returns
- The
error_code
object associated with the exception.
const char* web::websockets::client::websocket_exception::what
(
)
const
inline
Gets a string identifying the cause of the exception.
- Returns
- A null terminated character string.
The documentation for this class was generated from the following file: