Table of Contents

Class SyncException

Namespace
SteamNetworkLib.Exceptions
Assembly
SteamNetworkLib.dll

Exception thrown when a SyncVar or Steam data synchronization operation fails.

public class SyncException : SteamNetworkException, ISerializable
Inheritance
SyncException
Implements
Derived
Inherited Members

Remarks

This exception is part of the SteamNetworkLib exception family, so callers can catch SteamNetworkException for all library-level failures or catch SyncException when they need synchronization-specific details.

The SyncKey property is populated when the failed operation is tied to a specific lobby, member, host, or client sync key.

Constructors

SyncException(string)

Initializes a new instance of the SyncException class.

public SyncException(string message)

Parameters

message string

The message that describes the error.

SyncException(string, Exception)

Initializes a new instance of the SyncException class.

public SyncException(string message, Exception innerException)

Parameters

message string

The message that describes the error.

innerException Exception

The exception that caused the current exception.

SyncException(string, string)

Initializes a new instance of the SyncException class with key information.

public SyncException(string message, string syncKey)

Parameters

message string

The message that describes the error.

syncKey string

The sync key associated with the operation.

SyncException(string, string?, SteamNetworkErrorKind, string?, bool)

Initializes a new instance of the SyncException class with structured diagnostic details.

public SyncException(string message, string? syncKey, SteamNetworkErrorKind errorKind, string? operation = null, bool isRetryable = false)

Parameters

message string

The message that describes the error.

syncKey string

The sync key associated with the operation.

errorKind SteamNetworkErrorKind

The broad reason the operation failed.

operation string

The API operation or lifecycle step that failed.

isRetryable bool

True when retrying later may succeed; otherwise, false.

SyncException(string, string, Exception)

Initializes a new instance of the SyncException class with full details.

public SyncException(string message, string syncKey, Exception innerException)

Parameters

message string

The message that describes the error.

syncKey string

The sync key associated with the operation.

innerException Exception

The exception that caused the current exception.

SyncException(string, string?, Exception, SteamNetworkErrorKind, string?, bool)

Initializes a new instance of the SyncException class with structured diagnostic details and an inner exception.

public SyncException(string message, string? syncKey, Exception innerException, SteamNetworkErrorKind errorKind, string? operation = null, bool isRetryable = false)

Parameters

message string

The message that describes the error.

syncKey string

The sync key associated with the operation.

innerException Exception

The exception that caused the current exception.

errorKind SteamNetworkErrorKind

The broad reason the operation failed.

operation string

The API operation or lifecycle step that failed.

isRetryable bool

True when retrying later may succeed; otherwise, false.

Properties

SyncKey

Gets the key associated with the sync operation, if available.

public string? SyncKey { get; }

Property Value

string