DotNetDupe
4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Toggle main menu visibility
Loading...
Searching...
No Matches
WebSocketException.cpp
Go to the documentation of this file.
1
#include "
pch.h
"
2
#include "
System/Net/WebSockets/WebSocketException.h
"
3
#include "
System/String.h
"
4
5
namespace
DotNetDupe
{
6
namespace
System
{
7
namespace
Net
{
8
namespace
WebSockets
{
9
10
WebSocketException::WebSocketException
(
const
String
& sMessage)
11
:
SystemException
(sMessage), m_eWebSocketErrorCode(
WebSocketError
::
Faulted
), m_iNativeErrorCode(0) {
13
}
14
15
WebSocketException::WebSocketException
(
WebSocketError
eError,
const
String
& sMessage)
16
:
SystemException
(sMessage), m_eWebSocketErrorCode(eError), m_iNativeErrorCode(0) {
18
}
19
20
WebSocketException::WebSocketException
(
WebSocketError
eError,
int
iNativeErrorCode,
const
String
& sMessage)
21
:
SystemException
(sMessage), m_eWebSocketErrorCode(eError), m_iNativeErrorCode(iNativeErrorCode) {
23
}
24
25
WebSocketException::WebSocketException
(
WebSocketError
eError,
const
Exception
& innerException)
26
:
SystemException
(
String
(innerException.
What
()), innerException), m_eWebSocketErrorCode(eError), m_iNativeErrorCode(0) {
28
}
29
30
WebSocketException::WebSocketException
(
WebSocketError
eError,
const
String
& sMessage,
const
Exception
& innerException)
31
:
SystemException
(sMessage, innerException), m_eWebSocketErrorCode(eError), m_iNativeErrorCode(0) {
33
}
34
35
WebSocketError
WebSocketException::GetWebSocketErrorCode
()
const
{
37
return
m_eWebSocketErrorCode;
38
}
39
40
int
WebSocketException::GetErrorCode
()
const
{
42
return
m_iNativeErrorCode;
43
}
44
45
}
46
}
47
}
48
}
String.h
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
WebSocketException.h
Exception thrown when an error occurs during RFC 6455 WebSocket communication or handshakes.
DotNetDupe::System::Exception::What
const char * What() const
Gets a message that describes the current exception.
Definition
Exception.h:46
DotNetDupe::System::Exception::Exception
Exception()
Initializes a new instance of the Exception class with a default system-supplied message.
Definition
Exception.cpp:15
DotNetDupe::System::Net::WebSockets::WebSocketException::WebSocketException
WebSocketException(const String &sMessage)
Constructs a WebSocketException with a custom descriptive error message.
Definition
WebSocketException.cpp:10
DotNetDupe::System::Net::WebSockets::WebSocketException::GetWebSocketErrorCode
WebSocketError GetWebSocketErrorCode() const
Gets the structured WebSocketError enumeration code.
Definition
WebSocketException.cpp:35
DotNetDupe::System::Net::WebSockets::WebSocketException::GetErrorCode
int GetErrorCode() const
Gets the native operating system error code associated with this exception.
Definition
WebSocketException.cpp:40
DotNetDupe::System::String
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition
String.h:74
DotNetDupe::System::SystemException::SystemException
SystemException()
Initializes a new instance of the SystemException class with a default message.
Definition
Exception.cpp:48
DotNetDupe::System::Net::WebSockets
Definition
WebSocket.h:19
DotNetDupe::System::Net::WebSockets::WebSocketError
WebSocketError
Categorizes errors that occur during WebSocket protocol handshakes, framing, or socket I/O.
Definition
WebSocketException.h:17
DotNetDupe::System::Net::WebSockets::WebSocketError::Faulted
@ Faulted
General fault occurred during processing.
Definition
WebSocketException.h:20
DotNetDupe::System::Net
Definition
Dns.h:13
DotNetDupe::System
Definition
Action.h:11
DotNetDupe
Definition
IServiceCollection.h:7
pch.h
DotNetDupe
WebSocketException.cpp
Generated by
1.18.0