Class RelayServiceException
Represents an exception that occurs when communicating with the Unity Relay Service.
Implements
Inherited Members
Namespace: Unity.Services.Relay
Assembly: Unity.Services.Multiplayer.dll
Syntax
public class RelayServiceException : RequestFailedException, ISerializable
Constructors
RelayServiceException(Exception)
Creates a RelayServiceException.
Declaration
public RelayServiceException(Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
Exception | innerException | The exception raised by the service, if any. |
RelayServiceException(long, string)
Creates a RelayServiceException.
Declaration
public RelayServiceException(long errorCode, string message)
Parameters
Type | Name | Description |
---|---|---|
long | errorCode | The error code or the HTTP Status returned by the service. |
string | message | The description of the exception. |
RelayServiceException(RelayExceptionReason, string)
Creates a RelayServiceException.
Declaration
public RelayServiceException(RelayExceptionReason reason, string message)
Parameters
Type | Name | Description |
---|---|---|
Relay |
reason | The error code or the HTTP Status returned by the service. |
string | message | The description of the exception. |
RelayServiceException(RelayExceptionReason, string, Exception)
Creates a RelayServiceException.
Declaration
public RelayServiceException(RelayExceptionReason reason, string message, Exception innerException)
Parameters
Type | Name | Description |
---|---|---|
Relay |
reason | The error code or the HTTP Status returned by the service. |
string | message | The description of the exception. |
Exception | innerException | The exception raised by the service, if any. |
Properties
ApiError
If applicable, the specific details of the API error that caused the exception.
Declaration
public ErrorResponseBody ApiError { get; }
Property Value
Type | Description |
---|---|
Error |
Reason
The reason of the exception.
Declaration
public RelayExceptionReason Reason { get; }
Property Value
Type | Description |
---|---|
Relay |