Skip to content

Commit c7b620f

Browse files
committed
fix: fatalerror
1 parent a24bd35 commit c7b620f

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

templates/apple/Sources/Client.swift.twig

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,8 @@ open class Client {
133133
/// @param String endPoint
134134
///
135135
/// @return Client
136-
/// @throws Exception
137136
///
138-
open func setEndpoint(_ endPoint: String) throws -> Client {
137+
open func setEndpoint(_ endPoint: String) -> Client {
139138
if !endPoint.hasPrefix("http://") && !endPoint.hasPrefix("https://") {
140139
fatalError("Invalid endpoint URL: \(endPoint)")
141140
}
@@ -154,9 +153,8 @@ open class Client {
154153
/// @param String endPoint
155154
///
156155
/// @return Client
157-
/// @throws Exception
158156
///
159-
open func setEndpointRealtime(_ endPoint: String) throws -> Client {
157+
open func setEndpointRealtime(_ endPoint: String) -> Client {
160158
if !endPoint.hasPrefix("ws://") && !endPoint.hasPrefix("wss://") {
161159
fatalError("Invalid realtime endpoint URL: \(endPoint)")
162160
}

templates/swift/Sources/Client.swift.twig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,8 @@ open class Client {
130130
/// @param String endPoint
131131
///
132132
/// @return Client
133-
/// @throws Exception
134133
///
135-
open func setEndpoint(_ endPoint: String) throws -> Client {
134+
open func setEndpoint(_ endPoint: String) -> Client {
136135
if !endPoint.hasPrefix("http://") && !endPoint.hasPrefix("https://") {
137136
fatalError("Invalid endpoint URL: \(endPoint)")
138137
}

0 commit comments

Comments
 (0)