Skip to content

Commit

Permalink
adding in a few missed public initializers (#20)
Browse files Browse the repository at this point in the history
* adding in a few missed public initializers
  • Loading branch information
heckj authored Apr 11, 2024
1 parent bc165bd commit 6fca494
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Sources/AutomergeRepo/Sync/SyncV1Msg+Errors.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,29 @@ public extension SyncV1Msg {
enum Errors: Sendable {
public struct Timeout: Sendable, LocalizedError {
public var errorDescription: String = "Task timed out before completion"
public init(errorDescription: String? = nil) {
if let errorDescription {
self.errorDescription = errorDescription
}
}
}

public struct SyncComplete: Sendable, LocalizedError {
public var errorDescription: String = "The synchronization process is complete"
public init(errorDescription: String? = nil) {
if let errorDescription {
self.errorDescription = errorDescription
}
}
}

public struct ConnectionClosed: Sendable, LocalizedError {
public var errorDescription: String = "The websocket task was closed and/or nil"
public init(errorDescription: String? = nil) {
if let errorDescription {
self.errorDescription = errorDescription
}
}
}

public struct InvalidURL: Sendable, LocalizedError {
Expand Down

0 comments on commit 6fca494

Please sign in to comment.