v1.1.4
Latest
2022.3+

Class RelayServiceException

Represents an exception that occurs when communicating with the Unity Relay Service.

Inheritance
System.Object
System.Exception
RelayServiceException
Inherited Members
System.Exception.GetBaseException()
System.Exception.ToString()
System.Exception.GetObjectData(System.Runtime.Serialization.SerializationInfo, System.Runtime.Serialization.StreamingContext)
System.Exception.GetType()
System.Exception.Message
System.Exception.Data
System.Exception.InnerException
System.Exception.TargetSite
System.Exception.StackTrace
System.Exception.HelpLink
System.Exception.Source
System.Exception.HResult
System.Exception.SerializeObjectState
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.MemberwiseClone()
Namespace: Unity.Services.Relay
Syntax
public class RelayServiceException : RequestFailedException, ISerializable, _Exception

Constructors

RelayServiceException(Exception)

Creates a RelayServiceException.

Declaration
public RelayServiceException(Exception innerException)
Parameters
TypeNameDescription
System.ExceptioninnerException

The exception raised by the service, if any.

RelayServiceException(Int64, String)

Creates a RelayServiceException.

Declaration
public RelayServiceException(long errorCode, string message)
Parameters
TypeNameDescription
System.Int64errorCode

The error code or the HTTP Status returned by the service.

System.Stringmessage

The description of the exception.

RelayServiceException(RelayExceptionReason, String)

Creates a RelayServiceException.

Declaration
public RelayServiceException(RelayExceptionReason reason, string message)
Parameters
TypeNameDescription
RelayExceptionReasonreason

The error code or the HTTP Status returned by the service.

System.Stringmessage

The description of the exception.

RelayServiceException(RelayExceptionReason, String, Exception)

Creates a RelayServiceException.

Declaration
public RelayServiceException(RelayExceptionReason reason, string message, Exception innerException)
Parameters
TypeNameDescription
RelayExceptionReasonreason

The error code or the HTTP Status returned by the service.

System.Stringmessage

The description of the exception.

System.ExceptioninnerException

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
TypeDescription
ErrorResponseBody

Reason

The reason of the exception.

Declaration
public RelayExceptionReason Reason { get; }
Property Value
TypeDescription
RelayExceptionReason