Class WebSocketException
Provides a base exception for WebSocket errors.
public class WebSocketException : Exception, ISerializable
- Inheritance
-
WebSocketException
- Implements
- Inherited Members
Constructors
WebSocketException()
Initializes a new instance of the WebSocketException class.
public WebSocketException()
WebSocketException(int)
Initializes a new instance of the WebSocketException class with a specified status code.
public WebSocketException(int statusCode)
Parameters
statusCode
intThe status code of the exception.
WebSocketException(int, string)
Initializes a new instance of the WebSocketException class with a specified status code and error message.
public WebSocketException(int statusCode, string message)
Parameters
WebSocketException(int, string, Exception)
Initializes a new instance of the WebSocketException class with a specified status code, error message, and a reference to the inner exception that is the cause of this exception.
public WebSocketException(int statusCode, string message, Exception innerException)
Parameters
statusCode
intThe status code for the exception.
message
stringThe message for the exception.
innerException
ExceptionThe inner exception that is the cause of this exception.
WebSocketException(SerializationInfo, StreamingContext)
Initializes a new instance of the WebSocketException class with serialized data.
protected WebSocketException(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoThe object that holds the serialized object data.
context
StreamingContextThe contextual information about the source or destination.
WebSocketException(string)
Initializes a new instance of the WebSocketException class with a specified error message.
public WebSocketException(string message)
Parameters
message
stringThe message for the exception.
WebSocketException(string, Exception)
Initializes a new instance of the WebSocketException class with a specified error message and a reference to the inner exception that is the cause of this exception.
public WebSocketException(string message, Exception innerException)
Parameters
message
stringThe message for the exception.
innerException
ExceptionThe inner exception that is the cause of this exception.
Properties
StatusCode
Gets the status code.
public int StatusCode { get; }
Property Value
Methods
GetObjectData(SerializationInfo, StreamingContext)
Sets the SerializationInfo with information about the exception.
public override void GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
info
SerializationInfoThe SerializationInfo that holds the serialized object data about the exception being thrown.
context
StreamingContextThe StreamingContext that contains contextual information about the source or destination.