Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove assert #127

Merged
merged 1 commit into from
Apr 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions Sources/Atlantis.swift
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,13 @@ extension Atlantis {
switch taskOrConnection {
case let task as URLSessionTask:
guard let package = TrafficPackage.buildRequest(sessionTask: task, id: id) else {
assertionFailure("Should build package from URLSessionTask")
print("[Atlantis] ❌ Error: Should build package from URLSessionTask")
return nil
}
packages[id] = package
return package
default:
assertionFailure("Do not support new Type \(String(describing: taskOrConnection.className))")
print("[Atlantis] ❌ Error: Do not support new Type \(String(describing: taskOrConnection.className))")
}
return nil
}
Expand Down Expand Up @@ -340,8 +340,6 @@ extension Atlantis {

// Sending via Bonjour service
startSendingWebsocketMessage(package)
} else {
assertionFailure("Something went wrong! Should find a previous WS Package! Please contact the author!")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/AtlantisHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class AtlantisHelper: NSObject {
}

// And default.
assertionFailure("Have NSURLSessionWebSocketMessage but can neither get data nor string.")
print("[Atlantis] ❌ Error: Have NSURLSessionWebSocketMessage but can neither get data nor string.")
return (nil, nil)
}()
responseHandler(body.string, body.data, error)
Expand Down